linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Mel Gorman <mgorman@suse.de>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	"Muchun Song" <muchun.song@linux.dev>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Tim Chen" <tim.c.chen@intel.com>,
	Aubrey Li <aubrey.li@intel.com>, Rik van Riel <riel@surriel.com>,
	Raghavendra K T <raghavendra.kt@amd.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	"Xunlei Pang" <xlpang@linux.alibaba.com>,
	<linux-kernel@vger.kernel.org>, <cgroups@vger.kernel.org>,
	<linux-mm@kvack.org>, Chen Yu <yu.chen.surf@foxmail.com>
Subject: Re: [PATCH] sched/numa: Add statistics of numa balance task migration and swap
Date: Thu, 3 Apr 2025 10:47:44 +0800	[thread overview]
Message-ID: <7cbbbd8f-a4b4-491d-bb60-97defff6007c@intel.com> (raw)
In-Reply-To: <ufu5fuhwzzdhjoltgt5bpoqaonqur4t44phmz4oninzqlqpop7@hbwza7jri3ly>

Hi Michal,

thanks for taking a look at this,

On 4/2/2025 9:24 PM, Michal Koutný wrote:
> Hello Chen.
> 
> On Wed, Apr 02, 2025 at 09:06:11AM +0800, Chen Yu <yu.c.chen@intel.com> 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?
> 

In the context of NUMA balancing, it would be helpful to not only 
monitor on the activities of individual task/thread but also the 
resource usage and task migrations at the group level - which helps us 
quickly evaluate the performance and resource usage of the container - 
like per memcg numa_pages_migrated, numa_pte_updates introduced in
commit f77f0c751478 ("mm,memcg: provide per-cgroup counters for NUMA 
balancing operations"). Yes, we can iterate the /proc/$pid/sched to
find the accumulated NUMA stat, and the introduction of per - cgroup 
numa stat can help users more conveniently track the overall data of the 
workload.

Besides, I'm considering evaluating the per - cgroup NUMA balance 
control[1] to help users do fine - grain control per workload. This per 
- cgroup NUMA balance stat could be used to evaluate the efficiency of 
per - cgroup NUMA balance.

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

Got it, will do in next version.

[1] 
https://lore.kernel.org/lkml/b3f1f6c478127a38b9091a8341374ba160d25c5a.1740483690.git.yu.c.chen@intel.com/

thanks,
Chenyu

> 
> Thanks,
> Michal


  parent reply	other threads:[~2025-04-03  2:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  1:06 Chen Yu
2025-04-02 13:24 ` Michal Koutný
2025-04-02 17:43   ` K Prateek Nayak
2025-04-03 17:57     ` Michal Koutný
2025-04-03  2:47   ` Chen, Yu C [this message]
2025-04-03 18:03     ` Michal Koutný
2025-04-02 13:33 ` Madadi Vineeth Reddy
2025-04-02 17:23   ` K Prateek Nayak
2025-04-02 18:08     ` Madadi Vineeth Reddy
2025-04-02 17:35 ` K Prateek Nayak
2025-04-03  2:49   ` Chen, Yu C
2025-04-02 18:50 ` Madadi Vineeth Reddy
2025-04-03  2:52   ` Chen, Yu C

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cbbbd8f-a4b4-491d-bb60-97defff6007c@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=aubrey.li@intel.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=peterz@infradead.org \
    --cc=raghavendra.kt@amd.com \
    --cc=riel@surriel.com \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=tim.c.chen@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=xlpang@linux.alibaba.com \
    --cc=yu.chen.surf@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox