Subject: Re: [PATCH] arm64: clear_page[s] using memset

From: Catalin Marinas <[email-masked]>
Date: Tue, 7 Apr 2026 10:42:00 +0100

On Tue, Apr 07, 2026 at 11:25:55AM +0200, Linus Walleij wrote:
> On Thu, Apr 2, 2026 at 10:57 PM Catalin Marinas <[email-masked]> wrote:
> > On Fri, Mar 06, 2026 at 09:57:50AM +0100, Linus Walleij wrote:
> > > There is no need to try to second-guess the compiler when
> > > clearing memory. Just call memset() like everyone else.
> >
> > Hmm, that "like everyone else" made me think - why not move this to
> > generic code and only the 1-2 platforms that need their own should
> > override it? Could we do the same with copy_page()?
> >
> > Sorry, more work all of a sudden ;).
> 
> I actually had that planned, I just wanted to know if this would
> be fine for arm64 first so that there is a user.
> 
> It seems you are on board so I will send a 2-patch series
> next.

We might as well merge the arm64 patch first and do the cross-arch
cleanup separately, queued via akpm's tree.

> > > While at it, implement the shorthand for directly calling
> > > the new prototype clear_pages() for larger page chunks.
> > >
> > > No performance regressions can be seen, the fastpath
> > > benchmarks differences are in the noise.
> >
> > I assume the benchmarks ran on real hardware (had to ask, last time you
> > mentioned qemu ;)).
> 
> Quoting my own commit message hehe:
> 
> > No performance regressions can be seen, the fastpath
> > benchmarks differences are in the noise.
> 
> This was tested on hardware with Ryan Robert's fastpath tool.

It wasn't clear to me where the fastpath tool ran ;).

Thanks.

-- 
Catalin