Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543936
| From | Sam Ravnborg <sam@ravnborg.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 06/14] sparc64: general shared context tsb creation and support |
| Date | 2016-12-17 09:00 +0100 |
| Message-ID | <sPi4p-6Nn-5@gated-at.bofh.it> (permalink) |
| References | <sP5Ad-7fU-9@gated-at.bofh.it> <sP5Ad-7fU-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Mike
> --- a/arch/sparc/mm/hugetlbpage.c
> +++ b/arch/sparc/mm/hugetlbpage.c
> @@ -162,8 +162,14 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
> {
> pte_t orig;
>
> - if (!pte_present(*ptep) && pte_present(entry))
> - mm->context.hugetlb_pte_count++;
> + if (!pte_present(*ptep) && pte_present(entry)) {
> +#if defined(CONFIG_SHARED_MMU_CTX)
> + if (pte_val(entry) | _PAGE_SHR_CTX_4V)
> + mm->context.shared_hugetlb_pte_count++;
> + else
> +#endif
> + mm->context.hugetlb_pte_count++;
> + }
This kind of conditional code it just too ugly to survive...
Could a static inline be used to help you here?
The compiler will inline it so there should not be any run-time cost
>
> mm_rss -= saved_thp_pte_count * (HPAGE_SIZE / PAGE_SIZE);
> #endif
> @@ -544,8 +576,10 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
> * us, so we need to zero out the TSB pointer or else tsb_grow()
> * will be confused and think there is an older TSB to free up.
> */
> - for (i = 0; i < MM_NUM_TSBS; i++)
> + for (i = 0; i < MM_NUM_TSBS; i++) {
> mm->context.tsb_block[i].tsb = NULL;
> + mm->context.tsb_descr[i].tsb_base = 0UL;
> + }
This change seems un-related to the rest?
Sam
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 06/14] sparc64: general shared context tsb creation and support Mike Kravetz <mike.kravetz@oracle.com> - 2016-12-16 19:40 +0100
Re: [RFC PATCH 06/14] sparc64: general shared context tsb creation and support Sam Ravnborg <sam@ravnborg.org> - 2016-12-17 09:00 +0100
Re: [RFC PATCH 06/14] sparc64: general shared context tsb creation and support Mike Kravetz <mike.kravetz@oracle.com> - 2016-12-19 02:00 +0100
csiph-web