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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87731f92-d3bf-9c21-2adc-ffd023ac6b0e@huawei.com>
Date:   Fri, 24 Nov 2023 15:43:14 +0800
From:   "zhangpeng (AS)" <zhangpeng362@...wei.com>
To:     Matthew Wilcox <willy@...radead.org>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <akpm@...ux-foundation.org>, <fengwei.yin@...el.com>,
        <ying.huang@...el.com>, <aneesh.kumar@...ux.ibm.com>,
        <shy828301@...il.com>, <hughd@...gle.com>, <david@...hat.com>,
        <wangkefeng.wang@...wei.com>, <sunnanyong@...wei.com>
Subject: Re: [RFC PATCH] mm: filemap: avoid unnecessary major faults in
 filemap_fault()

On 2023/11/24 14:05, Matthew Wilcox wrote:

> On Wed, Nov 22, 2023 at 10:00:52PM +0800, Peng Zhang wrote:
>> From: ZhangPeng <zhangpeng362@...wei.com>
>>
>> The major fault occurred when using mlockall(MCL_CURRENT | MCL_FUTURE)
>> in application, which leading to an unexpected performance issue[1].
>>
>> This caused by temporarily cleared pte during a read/modify/write update
>> of the pte, eg, do_numa_page()/change_pte_range().
> What I haven't quite understood yet is why we need to set the pte to
> zero on x86 in the specific case of do_numa_page().  I understand that
> ppc needs to.

I'm also curious. Could ptep_modify_prot_start() of other architectures
(except ppc) not clear pte? We are mainly concerned with arm64 and x86.

> Could someone explain why the _default_ definition of
> ptep_modify_prot_start() is not:
>
> +++ b/include/linux/pgtable.h
> @@ -1074,7 +1074,7 @@ static inline pte_t ptep_modify_prot_start(struct vm_area_struct *vma,
>                                             unsigned long addr,
>                                             pte_t *ptep)
>   {
> -       return __ptep_modify_prot_start(vma, addr, ptep);
> +       return *ptep;
>   }
>
>   /*
>
>
-- 
Best Regards,
Peng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ