Re: [PATCH 4/4] mm/mprotect: special-case small folios when applying write permissions
From: Pedro Falcato
Date: Fri Mar 20 2026 - 06:38:55 EST
On Thu, Mar 19, 2026 at 07:17:31PM +0000, Lorenzo Stoakes (Oracle) wrote:
> On Thu, Mar 19, 2026 at 06:31:08PM +0000, Pedro Falcato wrote:
> > The common order-0 case is important enough to want its own branch, and
> > avoids the hairy, large loop logic that the CPU does not seem to handle
> > particularly well.
> >
>
> I think it'd be good to get a sense per-commit what the perf impact is.
I added some numbers on the cover letter - this patch + the __always_inline
one do the heavy lifting.
>
> > Signed-off-by: Pedro Falcato <pfalcato@xxxxxxx>
>
> I am iffy on the likely() in the same way I am always iffy on non-profile backed
> likely()/unlikely() but this change seems sensible enough so:
>
> Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx>
Thanks for the review!
--
Pedro