Re: [PATCH] mm/mempolicy: add sysfs interface to override NUMA node bandwidth
From: Yee Li
Date: Thu Mar 12 2026 - 23:08:19 EST
Hi Jonathan,
Thanks for the review.
As I note below, I'm not convinced this is the best layer to be injecting
data at if we want a debug interface that allows us to reflect real
hardware. Might be the sort of patch that is useful outside the tree though
so thanks for sharing it!
Perhaps a small tool to compute weights from the desired bandwidth
would be a better approach.
If it was an SRAT (for GPs) / HMAT issue I'd suggest table injection is
an adequate way to do testing and debug.
CDAT is trickier, but maybe we should be thinking about a debug path to inject
that as well - similar to what we do for ACPI tables.
From my point of view I'd rather see debug / testing interfaces that test the
whole flow rather than just this top layer control.
However, I can see this is a useful patch for developers. But if you
are developing debugging bandwidth-aware memory policies, I'm going to assume
you don't mind building a kernel and adding this patch to make your life
easier!
So to me, useful tool but I'm not 'yet' convinced it should be upstream.
You are right, table injection is likely the better approach.
During early hardware development the platform is often unstable, and
firmware may not be able to report it accurately. Letting the OS handle
debugging and evaluate the results can make experimentation easier.
And, thank you for checking the code.