Re: [PATCH] sched/numa: Add statistics of numa balance task migration and swap

From: K Prateek Nayak
Date: Wed Apr 02 2025 - 13:53:53 EST


Hello Michal,

On 4/2/2025 6:54 PM, Michal Koutný wrote:
Hello Chen.

On Wed, Apr 02, 2025 at 09:06:11AM +0800, Chen Yu <yu.c.chen@xxxxxxxxx> wrote:
On system with NUMA balancing enabled, it is found that tracking
the task activities due to NUMA balancing is helpful.
...
The following two new fields:

numa_task_migrated
numa_task_swapped

will be displayed in both
/sys/fs/cgroup/{GROUP}/memory.stat and /proc/{PID}/sched

Why is the field /proc/$pid/sched not enough?

The /proc/$pid/sched accounting is only done when schedstats are
enabled. memcg users might want to track it separately without relying
on schedstats which also enables a bunch of other scheduler related
stats collection adding more overheads.


Also, you may want to update Documentation/admin-guide/cgroup-v2.rst
too.

Thanks,
Michal

--
Thanks and Regards,
Prateek