[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44b7d213-cca6-45d6-a48a-a3f358e7bca3@linux.ibm.com>
Date: Thu, 3 Apr 2025 00:20:50 +0530
From: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
To: Chen Yu <yu.c.chen@...el.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Mel Gorman <mgorman@...e.de>, Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeel.butt@...ux.dev>,
Muchun Song <muchun.song@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>,
Tim Chen <tim.c.chen@...el.com>, Aubrey Li <aubrey.li@...el.com>,
Rik van Riel <riel@...riel.com>,
Raghavendra K T <raghavendra.kt@....com>,
K Prateek Nayak <kprateek.nayak@....com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Xunlei Pang <xlpang@...ux.alibaba.com>, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, linux-mm@...ck.org,
Chen Yu <yu.chen.surf@...mail.com>,
Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Subject: Re: [PATCH] sched/numa: Add statistics of numa balance task migration
and swap
Hi Chen Yu,
On 02/04/25 06:36, Chen Yu wrote:
> On system with NUMA balancing enabled, it is found that tracking
> the task activities due to NUMA balancing is helpful. NUMA balancing
> has two mechanisms for task migration: one is to migrate the task to
> an idle CPU in its preferred node, the other is to swap tasks on
> different nodes if they are on each other's preferred node.
>
> The kernel already has NUMA page migration statistics in
> /sys/fs/cgroup/mytest/memory.stat and /proc/{PID}/sched.
> but does not have statistics for task migration/swap.
> Add the task migration and swap count accordingly.
>
> 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
I was able to see the fields and their corresponding values for schbench:
numa_task_swapped : 2
numa_task_migrated : 0
numa_task_swapped : 1
numa_task_migrated : 0
numa_task_swapped : 0
numa_task_migrated : 0
numa_task_swapped : 1
Tested-by: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Thanks,
Madadi Vineeth Reddy
> Previous RFC version can be found here:
> https://lore.kernel.org/lkml/1847c5ef828ad4835a35e3a54b88d2e13bce0eea.1740483690.git.yu.c.chen@intel.com/
>
> Signed-off-by: Chen Yu <yu.c.chen@...el.com>
> ---
> RFC->v1: Rename the nr_numa_task_migrated to
> numa_task_migrated, and nr_numa_task_swapped
> numa_task_swapped in /proc/{PID}/sched,
> so both cgroup's memory.stat and task's
> sched have the same field name.
> ---
> include/linux/sched.h | 4 ++++
> include/linux/vm_event_item.h | 2 ++
> kernel/sched/core.c | 10 ++++++++--
> kernel/sched/debug.c | 4 ++++
> mm/memcontrol.c | 2 ++
> mm/vmstat.c | 2 ++
> 6 files changed, 22 insertions(+), 2 deletions(-)
Powered by blists - more mailing lists