On 3/13/26 2:31 AM, Huang, Ying wrote:
"Vlastimil Babka (SUSE)" <[email protected]> writes:
On 3/13/26 07:14, JP Kobryn (Meta) wrote:
On 3/12/26 10:07 PM, Huang, Ying wrote:
"JP Kobryn (Meta)" <[email protected]> writes:
On 3/12/26 6:40 AM, Vlastimil Babka (SUSE) wrote:
How about I change from per-policy hit/miss/foreign triplets to a single
aggregated policy triplet (i.e. just 3 new counters which account for
all policies)? They would follow the same hit/miss/foreign semantics
already proposed (visible in quoted text above). This would still
provide the otherwise missing signal of whether policy-driven
allocations to a node are intentional or fallback.
Note that I am also planning on moving the stats off of the memcg so the
3 new counters will be global per-node in response to similar feedback.
Emm, what's the difference between these newly added counters and the
existing numa_hit/miss/foreign counters?
The existing counters don't account for node masks in the policies that
make use of them. An allocation can land on a node in the mask and still
be considered a miss because it wasn't the preferred node.
That sounds like we could just a new counter e.g. numa_hit_preferred and
adjust definitions accordingly? Or some other variant that fills the gap?
Or can we adjust the semantics of numa_hit/miss/foreign to consider the
preferred nodemask instead of the preferred node? Is there some
programs to depends on the current behavior?
Good question. I think it comes down to whether the existing semantics
are correct with respect to policies that make use of node masks. I gave
some thoughts on this in the previous reply to Vlastimil. That
correctness may be outside of the scope of this patch, but I can give
that a try afterward. I'd like to send a revision that reduces the new
counters to just 3 and moves them off of the memcg (as previously
mentioned in thread).
I know numastat is one consumer of the existing stats. It seems up to
the user on the interpretation of the data. Not sure about others.