All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] per cpuset load average
@ 2012-10-03 23:05 Andrea Righi
  2012-10-03 23:05 ` [PATCH RFC 1/3] sched: introduce distinct per-cpu " Andrea Righi
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrea Righi @ 2012-10-03 23:05 UTC (permalink / raw)
  To: Paul Menage, Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel

[ Premise: I'm not considering this patch suitable for inclusion, mostly
because I'm not convinced at all of the interface and I don't even know if
cpuset is the right place for this feature. However, I just wrote it for a
project and I would like to improve it, better integrate it in the kernel and
share the code in general, in case someone else is also interested to use this
feature. ]

Overview
~~~~~~~~
The cpusets subsystem allows to assign a different set of CPUs to a cgroup. A
typical use case is to split large systems in small CPU/memory partitions and
isolate certain users/applications in these subsets of the system.

Sometimes, to have a quick overview of each partition's state, we may be
interested to get the load average of the CPUs assigned to a particular cpuset,
rather than the global load average of the system.

Proposed solution
~~~~~~~~~~~~~~~~~
The proposal is to add a new file in the cpuset subsystem to report the load
average of the CPUs assinged to a particular cpuset cgroup.

Example:

 # echo 0-1 > /sys/fs/cgroup/cpuset/foo/cpuset.cpus
 # echo 2-3 > /sys/fs/cgroup/cpuset/bar/cpuset.cpus

 # echo $$ > /sys/fs/cgroup/cpuset/foo/tasks
 # for i in `seq 4`; do yes > /dev/null & done

 ... after ~5mins ...

 # cat /proc/loadavg /sys/fs/cgroup/cpuset/{foo,bar}/cpuset.loadavg
 3.99 2.66 1.24 6/377 2855
 3.98 2.64 1.20
 0.01 0.02 0.04

In this case we can easily find that the cpuset "foo" is the most busy in the
system.

[PATCH RFC 1/3] sched: introduce distinct per-cpu load average
[PATCH RFC 2/3] cpusets: add load avgerage interface
[PATCH RFC 3/3] cpusets: add documentation of the loadavg file

 include/linux/sched.h |    7 +++++
 kernel/cpuset.c       |   58 ++++++++++++++++++++++++++++++++++++
 kernel/sched/core.c   |   78 ++++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 139 insertions(+), 4 deletions(-)

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

end of thread, other threads:[~2012-10-04 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 23:05 [PATCH RFC 0/3] per cpuset load average Andrea Righi
2012-10-03 23:05 ` [PATCH RFC 1/3] sched: introduce distinct per-cpu " Andrea Righi
2012-10-04  8:59   ` Peter Zijlstra
2012-10-04  9:43     ` Andrea Righi
2012-10-04 12:12       ` Peter Zijlstra
2012-10-04 17:19         ` Andrea Righi
2012-10-03 23:05 ` [PATCH RFC 2/3] cpusets: add load avgerage interface Andrea Righi
2012-10-03 23:05 ` [PATCH RFC 3/3] cpusets: add documentation of the loadavg file Andrea Righi

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.