lkml.org 
[lkml]   [2018]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 15/20] powerpc/mm: Avoid useless lock with single page fragments
From
Date
On 9/18/18 10:27 PM, Christophe Leroy wrote:
> There is no point in taking the page table lock as
> pte_frag is always NULL when we have only one fragment.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/mm/pgtable-frag.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/mm/pgtable-frag.c b/arch/powerpc/mm/pgtable-frag.c
> index bc924822dcd6..ab4910e92aaf 100644
> --- a/arch/powerpc/mm/pgtable-frag.c
> +++ b/arch/powerpc/mm/pgtable-frag.c
> @@ -85,6 +85,9 @@ static pte_t *get_pte_from_cache(struct mm_struct *mm)
> {
> void *pte_frag, *ret;
>
> + if (PTE_FRAG_NR == 1)
> + return NULL;
> +
> spin_lock(&mm->page_table_lock);
> ret = mm->context.pte_frag;
> if (ret) {
>

May be update get_pmd_from_cache too?

-aneesh

\
 
 \ /
  Last update: 2018-09-19 05:36    [W:0.123 / U:22.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site