Re: [PATCH] mm/mempolicy: add sysfs interface to override NUMA node bandwidth

From: Huang, Ying

Date: Thu Mar 12 2026 - 05:42:36 EST


YeeLi <seven.yi.lee@xxxxxxxxx> writes:

> From: yeeli <seven.yi.lee@xxxxxxxxx>
>
> Automatic tuning for weighted interleaving [1] provides real benefits on
> systems with CXL support. However, platforms that lack HMAT or CDAT
> information cannot make use of this feature.
>
> If the bandwidth reported by firmware or the device deviates from the
> actual measured bandwidth, administrators also lack a clear way to adjust
> the per-node weight values.
>
> This patch introduces an optional Kconfig option,
> CONFIG_NUMA_BW_MANUAL_OVERRIDE (default n), which exposes node bandwidth
> R/W sysfs attributes under:
>
> /sys/kernel/mm/mempolicy/weighted_interleave/bw_nodeN
>
> The sysfs files are created and removed dynamically on node hotplug
> events, in sync with the existing weighted_interleave/nodeN attributes.
>
> Userspace can write a single bandwidth value (in MB/s) to override both
> read_bandwidth and write_bandwidth for the corresponding NUMA node. The
> value is then propagated to the internal node_bw_table via
> mempolicy_set_node_perf().
>
> This interface is intended for debugging and experimentation only.

How to use this new interface? Can you provide an example?

---
Best Regards,
Huang, Ying

> [1] Link:
> https://lkml.kernel.org/r/20250505182328.4148265-1-joshua.hahnjy@xxxxxxxxx
>

[snip]