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]
Date:   Thu, 21 Jan 2021 18:59:37 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     Will Deacon <will@...nel.org>,
        Prathu Baronia <prathubaronia2011@...il.com>
Cc:     Prathu Baronia <prathu.baronia@...plus.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Anshuman Khandual <anshuman.khandual@....com>,
        linux-kernel@...r.kernel.org, chintan.pandya@...plus.com,
        "glider@...gle.com" <glider@...gle.com>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 0/1] mm: Optimizing hugepage zeroing in arm64

On 2021-01-21 17:46, Will Deacon wrote:
> On Thu, Jan 21, 2021 at 10:21:50PM +0530, Prathu Baronia wrote:
>> This patch removes the unnecessary kmap calls in the hugepage zeroing path and
>> improves the timing by 62%.
>>
>> I had proposed a similar change in Apr-May'20 timeframe in memory.c where I
>> proposed to clear out a hugepage by directly calling a memset over the whole
>> hugepage but got the opposition that the change was not architecturally neutral.
>>
>> Upon revisiting this now I see significant improvement by removing around 2k
>> barrier calls from the zeroing path. So hereby I propose an arm64 specific
>> definition of clear_user_highpage().
> 
> Given that barrier() is purely a thing for the compiler, wouldn't the same
> change yield a benefit on any other architecture without HIGHMEM? In which
> case, I think this sort of change belongs in the core code if it's actually
> worthwhile.

I would have thought it's more the constant manipulation of the preempt 
and pagefault counts, rather than the compiler barriers between them, 
that has the impact. Either way, if arm64 doesn't need to be atomic WRT 
preemption when clearing parts of hugepages then I also can't imagine 
that anyone else (at least for !HIGHMEM) would either.

Robin.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ