Re: [PATCH] mm/damon: add damos_node_eligible_mem_bp tracepoint

From: SJ Park

Date: Sun Oct 04 2026 - 04:01:25 EST


Hi Ravi,

On Sat, 3 Oct 2026 13:27:27 -0700 Ravi Jonnalagadda <ravis.opensrc@xxxxxxxxx> wrote:

> Add a tracepoint for DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP quota goal
> evaluation. The tracepoint fires once per quota-score computation when
> the goal metric is DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP, exposing
> context_idx, scheme_idx, nid, target_value, and current_value.
> current_value is reported as the quota tuning sees it, after the goal's
> complement setting is applied.
>
> The DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP metric expresses node memory
> occupancy as basis points of eligible bytes. This information is not
> exposed through any existing external interface (perf stat, /proc, or
> sysfs), so the tracepoint is the only way for userspace to observe the
> target and current eligible-memory basis point values at quota-scoring
> time.

Thank you for this patch!

We have damos_esz tracepoint. Have you considered using it? It doesn't expose
the current value, though. I thought it wouldn't be real problem in most
cases, but I can show it could be problematic for node_eligible_mem_bp case, as
the metric value is not straightforward to see without using DAMON.

If you really need to know the current_value, I'm open to add a new tracepoint.
But I think it has no reason to make it only eligible_mem_bp specific. How
about adding more general purpose tracepoint, and/or update the current_value
file [1] under the goal sysfs directory to show the current current_value for
all goal types?

[1] https://origin.kernel.org/doc/html/latest/admin-guide/mm/damon/usage.html#sysfs-schemes-quota-goals


Thanks,
SJ

[...]