mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Display the cpu of sched domain in procfs
@ 2020-02-19  7:15 Chen Yu
  2020-02-19  8:13 ` Valentin Schneider
  0 siblings, 1 reply; 6+ messages in thread
From: Chen Yu @ 2020-02-19  7:15 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Peter Zijlstra, Ingo Molnar, Juri Lelli, Vincent Guittot,
	Mel Gorman, Tony Luck, Aubrey Li, Tim Chen, Dave Hansen,
	Borislav Petkov

Problem:
sched domain topology is not always consistent with the CPU topology exposed at
/sys/devices/system/cpu/cpuX/topology,  which makes it
hard for monitor tools to distinguish the CPUs among different sched domains.

For example, on x86 if there are NUMA nodes within a package, say,
SNC(Sub-Numa-Cluster),
then there would be no die sched domain but only NUMA sched domains
created. As a result,
you don't know what the sched domain hierarchical is by only looking
at /sys/devices/system/cpu/cpuX/topology.

Although by appending sched_debug in command line would show the sched
domain CPU topology,
it is only printed once during boot up, which makes it hard to track
at run-time.

Proposal:
Add *span* filed under proc sched_domain directory to represent the
set of CPUs in each
sched domain.

Question:
*Before sending the patch out, may I have you opinions on whether this
is doable?*


Here are the sample output on a SNC system after the patch been applied:
grep . /proc/sys/kernel/sched_domain/cpu0/domain*/span
/proc/sys/kernel/sched_domain/cpu0/domain0/span:0,96     (SMT domain)
/proc/sys/kernel/sched_domain/cpu0/domain1/span:0-3,7-9,13-15,19-20,
(MC domain)

                   96-99,103-105,109-111,

                   115-116
/proc/sys/kernel/sched_domain/cpu0/domain2/span:0-23,96-119
         (NUMA domain)
/proc/sys/kernel/sched_domain/cpu0/domain3/span:0-191
           (NUMA domain)


FYI, the corresponding CPU topology is:
grep . /sys/devices/system/cpu/cpu0/topology/*cpus_list
/sys/devices/system/cpu/cpu0/topology/core_cpus_list:0,96
/sys/devices/system/cpu/cpu0/topology/die_cpus_list:0-23,96-119
/sys/devices/system/cpu/cpu0/topology/package_cpus_list:0-47,96-143


thanks,
Chenyu

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

end of thread, other threads:[~2020-02-19 10:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19  7:15 [RFC] Display the cpu of sched domain in procfs Chen Yu
2020-02-19  8:13 ` Valentin Schneider
2020-02-19  8:53   ` Dietmar Eggemann
2020-02-19 10:01     ` Chen Yu
2020-02-19 10:00   ` Chen Yu
2020-02-19 10:46     ` Valentin Schneider

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®