Re: [PATCH] mm/mempolicy: recompute automatic interleave weights on memory hotplug

From: Gregory Price (Meta)

Date: Tue Oct 27 2026 - 10:09:23 EST


On 2026-10-27 14:04 +0100, David Hildenbrand (Arm) wrote:
> >>> + /*
> >>> + * HMAT and CXL report a node's bandwidth only when it first gains
> >>> + * memory, so recompute the weights whenever N_MEMORY changes.
> >>> + */
> >>> + wi_state_refresh();
> >>
> >> If the function fails, should we at least pr_warn_once() ?
> >>
> >
> > The only failure state is -ENOMEM, wasn't sure that was worth warning
> > on. I actually debated whether to just make this a void function.
> >
> > I don't have a strong feeling here, but happy to add a warn if you
> > prefer it.
>
> I'd assume we'd at least want to tell the world somehow that something is now
> imprecise?
>
> Or is not updating that harmless?
>

It's a potential performance regression, but if we just -ENOMEM'd a
kernel buffer to hold the weights, there's bigger issues.

I'll add a warn.

--
~Gregory