On Fri, 13 Dec 2024 15:19:20 +0900 Hyeonggon Yoo <hyeonggon.yoo@xxxxxx> wrote:
On 2024-12-11 06:54 AM, Joshua Hahn wrote:
This patch introduces an auto-configuration for the interleave weights
that aims to balance the two goals of setting node weights to be
proportional to their bandwidths and keeping the weight values low.
This balance is controlled by a value max_node_weight, which defines the
maximum weight a single node can take.
Hi Joshua,
I am wondering how this is going to work for host memory + CXL memory
interleaving. I guess by "the ACPI table" you mean the ACPI HMAT or CXL
CDAT, both of which does not provide the bandwidth of host memory.
If this feature does not consider the bandwidth of host memory, manual
configuration will be inevitable anyway.
Hi Hyeonggon,
Thank you for reviewing my patch!
As Gregory showed in his reply, I think it would be possible to get host bandwidth information
using the ACPI HMAT.
[-----8<-----]>
+What: /sys/kernel/mm/mempolicy/weighted_interleave/max_node_weight
+Date: December 2024
+Contact: Linux memory management mailing list <linux-mm@xxxxxxxxx>
+Description: Weight limiting / scaling interface
+
+ The maximum interleave weight for a memory node. When it is
+ updated, any previous changes to interleave weights (i.e. via
+ the nodeN sysfs interfaces) are ignored, and new weights are
+ calculated using ACPI-reported bandwidths and scaled.
+
At first this paragraph sounded like "previously stored weights are
discarded after setting max_node_weight", but I think you mean
"User can override the default values, but defaults values are
calculated regardless of the values set by the user". Right?
In the implementation, the first way you interpreted is the correct
description. That is, if a user manually changes a ndoe weight,
then updates the max_node_weight, the previous manual change will
be overwritten by the newly scaled values.
Does this behavior make sense?
Have a great day!