linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] sched/numa: add statistics of numa balance task migration
@ 2025-05-07 11:14 Chen Yu
  2025-05-07 11:17 ` [PATCH v4 1/2] sched/numa: fix task swap by skipping kernel threads Chen Yu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chen Yu @ 2025-05-07 11:14 UTC (permalink / raw)
  To: Peter Zijlstra, Andrew Morton
  Cc: mkoutny, Ingo Molnar, Tejun Heo, Johannes Weiner, Jonathan Corbet,
	Mel Gorman, Michal Hocko, Muchun Song, Roman Gushchin,
	Shakeel Butt, Chen, Tim C, Aubrey Li, Libo Chen, K Prateek Nayak,
	Madadi Vineeth Reddy, Venkat Rao Bagalkote, Jain, Ayush, cgroups,
	linux-doc, linux-mm, linux-kernel, Chen Yu, Chen Yu

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,
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.

The Tested-by and Acked-by tags are preserved, because these tags are provided
in version 1 which has the p->mm check.

Previous version:
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 migration

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-08 10:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 11:14 [PATCH v4 0/2] sched/numa: add statistics of numa balance task migration Chen Yu
2025-05-07 11:17 ` [PATCH v4 1/2] sched/numa: fix task swap by skipping kernel threads Chen Yu
2025-05-07 11:17 ` [PATCH v4 2/2] sched/numa: add statistics of numa balance task migration Chen Yu
2025-05-07 14:32 ` [PATCH v4 0/2] " Venkat Rao Bagalkote
2025-05-07 14:52   ` Chen, Yu C
2025-05-07 15:28     ` Venkat Rao Bagalkote
2025-05-08 10:23 ` Venkat Rao Bagalkote

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).