Re: [PATCH 1/1] x86/mm/pae: Align up pteval_t, pmdval_t and pudval_t to avoid split locks

From: Ingo Molnar
Date: Thu Apr 04 2024 - 03:57:05 EST



* Brian Gerst <brgerst@xxxxxxxxx> wrote:

> > > It's not a technical reason. It's a practical one: I don't want
> > > to spend time reviewing the fixes and dealing with the fallout
> > > and regressions that the fixes might cause.
> >
> > Yeah, so it's an indirect technical argument: fixes *with
> > tradeoffs* like this one have a future maintenance & robustness
> > cost. Fixes without tradeoffs are fine of course.
>
> What tradeoffs are there with this patch? This would not affect the
> page tables, since those are already properly aligned. Forcing
> alignment of stack variables is only a problem if it tickles a
> compiler bug.

It creates extra constraints on stack layout that wasn't there before,
so it can only be an invariant if the compiler can reorder variables,
or make the stack layout worse (introducing more holes).

Thanks,

Ingo