Re: [LSF/MM/BPF TOPIC] Weighted interleave auto-tuning

From: Gregory Price
Date: Fri Mar 14 2025 - 10:53:10 EST


On Fri, Mar 14, 2025 at 02:15:41PM +0000, Jonathan Cameron wrote:
> > > - Does this need to be in the kernel? A userspace daemon that monitors kernel
> > > metrics has the ability to make the changes (via the nodeN interfaces).
>
> If this was done in kernel, what metrics would make sense to drive this?
> Similar to hot page tracking we may run into contention with PMUs or similar and
> their other use cases.
>

Rather than directly affect weighted interleave, I think this stemmed
from the idea of a "smart policy" that adjusted allocations based on
bandwidth pressure and VMA permissions (code should be local, stack
should be local, heap could be interleaved - etc).

An example would be if DRAM bandwidth become pressured but CXL wasn't,
then maybe tossing some extra allocations directly to CXL would actually
decrease average latencies.

I'm not sure how we'd actually implement this in userland, and I think
this is ultimately MPOL_PONIES, but it's an interesting exploration.

Some of this context was lost as we worked on weighted interleave
auto-tuning.

~Gregory