Re: [RFC PATCH 34/56] x86/alternative: Save old bytes for alternatives

Nikolay Borisov
2025-10-30T15:43:02Z

On 10/30/25 16:39, Kaplan, David wrote:
<snip>

>>
>
> Yes, there is an 8B pointer to each allocation (although I didn't include that in the number above).
>
> There's a number of ways to optimize this, doing a single 'big buffer' with perhaps a 32-bit index seems rather straightforward. And maybe there are then further ways to squeeze this. But I think we're really talking about a small amount of memory, especially compared to the other overhead noted above.
>

I spoke with Vlastimil who's a lot more familiar with MM and he said
that allocations made early in the boot are likely to fall within the
same 2mb block so actually what we are discussing here might very well
fall within "premature optimisation" land.

> Thanks
> --David Kaplan