Re: [PATCH v2 0/2] mm/mprotect: micro-optimization work

From: Luke Yang

Date: Mon Apr 06 2026 - 10:32:43 EST


On Thu, Apr 2, 2026 at 9:55 AM Luke Yang <luyang@xxxxxxxxxx> wrote:
>
> On Wed, Apr 1, 2026 at 10:11 AM Pedro Falcato <pfalcato@xxxxxxx> wrote:
> >
> > On Mon, Mar 30, 2026 at 03:55:51PM -0400, Luke Yang wrote:
> > > Hi Pedro,
> > >
> > > Thanks for working on this. I just wanted to share that we've created a
> > > test kernel with your patches and tested on the following CPUs:
> > >
> > > --- aarch64 ---
> > > Ampere Altra
> > > Ampere Altra Max
> > >
> > > --- x86_64 ---
> > > AMD EPYC 7713
> > > AMD EPYC 7351
> > > AMD EPYC 7542
> > > AMD EPYC 7573X
> > > AMD EPYC 7702
> > > AMD EPYC 9754
> > > Intel Xeon Gold 6126
> > > Into Xeon Gold 6330
> > > Intel Xeon Gold 6530
> > > Intel Xeon Platinum 8351N
> > > Intel Core i7-6820HQ
> > >
> > > --- ppc64le ---
> > > IBM Power 10
> > >
> > > On average, we see improvements ranging from a minimum of 5% to a
> > > maximum of 55%, with most improvements showing around a 25% speed up in
> > > the libmicro/mprot_tw4m micro benchmark.
> >
> > Nice! Thanks for the tests. I'm wondering, what CPU saw 5% and what CPU
> > saw 55%? Or was it just inter-run variance?
> >
> > --
> > Pedro
> >
>
> 5% -> Ampere Altra Max
> 55% -> Ampere Altra
>
> Personally, I can't conclude at the moment if this is just inter-run
> variance. However, let me re-run the tests a few times on these two
> machines to see if this is consistent.
>
> Luke

Ampere Altra Max seems to consistently report ~5%. Ampere Altra seems
to exhibit more test variance. I now have some test runs that report a
5% or 10% gain.

Luke