[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Apr 2018 18:04:15 +0200
From: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
To: David Rientjes <rientjes@...gle.com>
Cc: paulmck@...ux.vnet.ibm.com, peterz@...radead.org,
akpm@...ux-foundation.org, kirill@...temov.name,
ak@...ux.intel.com, mhocko@...nel.org, dave@...olabs.net,
jack@...e.cz, Matthew Wilcox <willy@...radead.org>,
benh@...nel.crashing.org, mpe@...erman.id.au, paulus@...ba.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, hpa@...or.com,
Will Deacon <will.deacon@....com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
kemi.wang@...el.com, sergey.senozhatsky.work@...il.com,
Daniel Jordan <daniel.m.jordan@...cle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
haren@...ux.vnet.ibm.com, khandual@...ux.vnet.ibm.com,
npiggin@...il.com, bsingharora@...il.com,
Tim Chen <tim.c.chen@...ux.intel.com>,
linuxppc-dev@...ts.ozlabs.org, x86@...nel.org
Subject: Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()
On 03/04/2018 01:18, David Rientjes wrote:
> On Tue, 13 Mar 2018, Laurent Dufour wrote:
>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index a84ddc218bbd..73b8b99f482b 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -1263,8 +1263,11 @@ struct zap_details {
>> pgoff_t last_index; /* Highest page->index to unmap */
>> };
>>
>> -struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> - pte_t pte, bool with_public_device);
>> +struct page *__vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> + pte_t pte, bool with_public_device,
>> + unsigned long vma_flags);
>> +#define _vm_normal_page(vma, addr, pte, with_public_device) \
>> + __vm_normal_page(vma, addr, pte, with_public_device, (vma)->vm_flags)
>> #define vm_normal_page(vma, addr, pte) _vm_normal_page(vma, addr, pte, false)
>>
>> struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
>
> If _vm_normal_page() is a static inline function does it break somehow?
> It's nice to avoid the #define's.
No problem, I'll create it as a static inline function.
>
>> diff --git a/mm/memory.c b/mm/memory.c
>> index af0338fbc34d..184a0d663a76 100644
>> --- a/mm/memory.c
>> +++ b/mm/memory.c
>> @@ -826,8 +826,9 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
>> #else
>> # define HAVE_PTE_SPECIAL 0
>> #endif
>> -struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> - pte_t pte, bool with_public_device)
>> +struct page *__vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>> + pte_t pte, bool with_public_device,
>> + unsigned long vma_flags)
>> {
>> unsigned long pfn = pte_pfn(pte);
>>
>
> Would it be possible to update the comment since the function itself is no
> longer named vm_normal_page?
Sure.
Powered by blists - more mailing lists