lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <23abf32a-3f34-426f-a918-2af37b409329@huawei.com>
Date:   Wed, 20 Sep 2023 16:07:30 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     "Huang, Ying" <ying.huang@...el.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>, <willy@...radead.org>,
        <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <david@...hat.com>, Zi Yan <ziy@...dia.com>,
        Mike Kravetz <mike.kravetz@...cle.com>, <hughd@...gle.com>
Subject: Re: [PATCH 5/6] mm: memory: add vm_normal_pmd_folio()



On 2023/9/20 11:12, Huang, Ying wrote:
> Kefeng Wang <wangkefeng.wang@...wei.com> writes:
> 
>> The new vm_normal_pmd_folio() wrapper is similar to vm_normal_folio(),
>> which allow them to completely replace the struct page variables with
>> struct folio variables.
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
>> ---
>>   include/linux/mm.h |  2 ++
>>   mm/memory.c        | 10 ++++++++++
>>   2 files changed, 12 insertions(+)
>>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index 12335de50140..7d05ec047186 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -2327,6 +2327,8 @@ struct folio *vm_normal_folio(struct vm_area_struct *vma, unsigned long addr,
>>   			     pte_t pte);
>>   struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
>>   			     pte_t pte);
>> +struct folio *vm_normal_pmd_folio(struct vm_area_struct *vma, unsigned long addr,
>> +				  pmd_t pmd);
>>   struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
>>   				pmd_t pmd);
> 
> Why do not follow the counterpart of page (vm_normal_page_pmd()) to be
> vm_normal_folio_pmd()?

Personally, X_pmd_folio seems to get folio from a pmd, but X_folio_pmd 
looks like "return the PMD of a folio", I could use 
vm_normal_folio_pmd() for consistency, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ