From: Robin Murphy <robin.murphy@arm.com>
To: Will Deacon <will@kernel.org>,
Prathu Baronia <prathubaronia2011@gmail.com>
Cc: Prathu Baronia <prathu.baronia@oneplus.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
linux-kernel@vger.kernel.org, chintan.pandya@oneplus.com,
"glider@google.com" <glider@google.com>,
Andrey Konovalov <andreyknvl@google.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Andrew Morton <akpm@linux-foundation.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/1] mm: Optimizing hugepage zeroing in arm64
Date: Thu, 21 Jan 2021 18:59:37 +0000 [thread overview]
Message-ID: <de782758-a7bc-d5a5-832e-c09ce8fe7c00@arm.com> (raw)
In-Reply-To: <20210121174616.GA22740@willie-the-truck>
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.
next prev parent reply other threads:[~2021-01-21 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 16:51 [PATCH 0/1] mm: Optimizing hugepage zeroing in arm64 Prathu Baronia
2021-01-21 16:51 ` [PATCH 1/1] " Prathu Baronia
2021-01-21 17:46 ` [PATCH 0/1] " Will Deacon
2021-01-21 18:59 ` Robin Murphy [this message]
2021-01-22 12:13 ` Catalin Marinas
2021-01-22 12:45 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de782758-a7bc-d5a5-832e-c09ce8fe7c00@arm.com \
--to=robin.murphy@arm.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=chintan.pandya@oneplus.com \
--cc=geert@linux-m68k.org \
--cc=glider@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=prathu.baronia@oneplus.com \
--cc=prathubaronia2011@gmail.com \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).