From: Chen Yu <yu.c.chen@intel.com>
To: peterz@infradead.org, akpm@linux-foundation.org
Cc: mkoutny@suse.com, mingo@redhat.com, tj@kernel.org,
hannes@cmpxchg.org, corbet@lwn.net, mgorman@suse.de,
mhocko@kernel.org, muchun.song@linux.dev,
roman.gushchin@linux.dev, shakeel.butt@linux.dev,
tim.c.chen@intel.com, aubrey.li@intel.com, libo.chen@oracle.com,
kprateek.nayak@amd.com, vineethr@linux.ibm.com,
venkat88@linux.ibm.com, ayushjai@amd.com,
cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
yu.chen.surf@foxmail.com, Chen Yu <yu.c.chen@intel.com>
Subject: [PATCH v5 0/2] sched/numa: add statistics of numa balance task migration
Date: Fri, 23 May 2025 20:48:02 +0800 [thread overview]
Message-ID: <cover.1748002400.git.yu.c.chen@intel.com> (raw)
Introducing the task migration and swap statistics in the following places:
/sys/fs/cgroup/{GROUP}/memory.stat
/proc/{PID}/sched
/proc/vmstat
These statistics facilitate a rapid evaluation of the performance and resource
utilization of the target workload.
Patch 1 is a fix from Libo to avoid task swapping for kernel threads
and user thread that does not have mm, because Numa balance only cares
about the user pages via VMA.
Patch 2 is the major change to expose the statistics of task migration and
swapping in corresponding files.
The reason to fold patch 1 and patch 2 into 1 patch set is that patch 1 is
necessary for patch 2 to avoid accessing a NULL mm_struct from a kernel
thread, which causes NULL pointer exception.
Changes since v4:
Skip the kernel thread in patch 1, by checking if the target thread
has PF_KTHREAD(Peter). Besides, remove the check for PF_IDLE, because
idle thread has PF_KTHREAD set already(Prateek).
Previous version:
v4:
https://lore.kernel.org/all/cover.1746611892.git.yu.c.chen@intel.com/
v3:
https://lore.kernel.org/lkml/20250430103623.3349842-1-yu.c.chen@intel.com/
v2:
https://lore.kernel.org/lkml/20250408101444.192519-1-yu.c.chen@intel.com/
v1:
https://lore.kernel.org/lkml/20250402010611.3204674-1-yu.c.chen@intel.com/
Chen Yu (1):
sched/numa: add statistics of numa balance task
Libo Chen (1):
sched/numa: fix task swap by skipping kernel threads
Documentation/admin-guide/cgroup-v2.rst | 6 ++++++
include/linux/sched.h | 4 ++++
include/linux/vm_event_item.h | 2 ++
kernel/sched/core.c | 9 +++++++--
kernel/sched/debug.c | 4 ++++
kernel/sched/fair.c | 3 ++-
mm/memcontrol.c | 2 ++
mm/vmstat.c | 2 ++
8 files changed, 29 insertions(+), 3 deletions(-)
--
2.25.1
next reply other threads:[~2025-05-23 12:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 12:48 Chen Yu [this message]
2025-05-23 12:51 ` [PATCH v5 1/2] sched/numa: fix task swap by skipping kernel threads Chen Yu
2025-05-23 23:22 ` Shakeel Butt
2025-05-23 12:51 ` [PATCH v5 2/2] sched/numa: add statistics of numa balance task Chen Yu
2025-05-23 23:42 ` Shakeel Butt
2025-05-24 9:07 ` Chen, Yu C
2025-05-24 17:32 ` Shakeel Butt
2025-05-25 12:35 ` Chen, Yu C
2025-05-27 17:48 ` Shakeel Butt
2025-05-29 5:04 ` Chen, Yu C
2025-05-26 13:35 ` Michal Koutný
2025-05-27 9:20 ` Chen, Yu C
2025-05-27 18:15 ` Shakeel Butt
2025-06-02 16:53 ` Michal Koutný
2025-06-03 14:46 ` Chen, Yu C
2025-06-17 9:30 ` Michal Koutný
2025-06-19 13:03 ` Chen, Yu C
2025-06-19 14:06 ` Michal Koutný
2025-05-23 22:06 ` [PATCH v5 0/2] sched/numa: add statistics of numa balance task migration Andrew Morton
2025-05-23 23:52 ` Shakeel Butt
2025-05-28 0:21 ` Andrew Morton
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=cover.1748002400.git.yu.c.chen@intel.com \
--to=yu.c.chen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=aubrey.li@intel.com \
--cc=ayushjai@amd.com \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=hannes@cmpxchg.org \
--cc=kprateek.nayak@amd.com \
--cc=libo.chen@oracle.com \
--cc=linux-doc@vger.kernel.org \
--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=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tim.c.chen@intel.com \
--cc=tj@kernel.org \
--cc=venkat88@linux.ibm.com \
--cc=vineethr@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.