aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMike Galbraith <efault@gmx.de>2010-11-20 12:35:00 -0700
committerJohn Rigby <john.rigby@linaro.org>2010-12-13 16:44:50 -0700
commit17f4635b01ffc829f15d7b171f70966c71369585 (patch)
treef077f99c9c12e4e581d505359c8329d20829757c /Documentation
parente085b0ddf055e27c387825a52dfb3c0df119aa1d (diff)
sched: automated per session task groups V4
On Tue, 2010-11-16 at 18:28 +0100, Ingo Molnar wrote: > Mike, > > Mind sending a new patch with a separate v2 announcement in a new thread, once you > have something i could apply to the scheduler tree (for a v2.6.38 merge)? Changes since last: - switch to per session vs tty - make autogroups visible in /proc/sched_debug - make autogroups visible in /proc/<pid>/autogroup - add nice level bandwidth tweakability to /proc/<pid>/autogroup Modulo "kill it" debate outcome... A recurring complaint from CFS users is that parallel kbuild has a negative impact on desktop interactivity. This patch implements an idea from Linus, to automatically create task groups. This patch only per session autogroups, but leaves the way open for enhancement. Implementation: each task's signal struct contains an inherited pointer to a refcounted autogroup struct containing a task group pointer, the default for all tasks pointing to the init_task_group. When a task calls setsid(), the process wide reference to the default group is dropped, a new task group is created, and the process is moved into the new task group. Children thereafter inherit this task group, and increase it's refcount. On exit, a reference to the current task group is dropped when the last reference to each signal struct is dropped. The task group is destroyed when the last signal struct referencing it is freed. At runqueue selection time, IFF a task has no cgroup assignment, it's current autogroup is used. Autogroup bandwidth is controllable via setting it's nice level through the proc filesystem. cat /proc/<pid>/autogroup displays the task's group and the group's nice level. echo <nice level> > /proc/<pid>/autogroup sets the task group's shares to the weight of nice <level> task. Setting nice level is rate limited for !admin users due to the abuse risk of task group locking. The feature is enabled from boot by default if CONFIG_SCHED_AUTOGROUP is selected, but can be disabled via the boot option noautogroup, and can be also be turned on/off on the fly via.. echo [01] > /proc/sys/kernel/sched_autogroup_enabled. ..which will automatically move tasks to/from the root task group. Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kernel-parameters.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index cdd2a6e8a3b7..b79a8fbf0dd7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1622,6 +1622,8 @@ and is between 256 and 4096 characters. It is defined in the file
noapic [SMP,APIC] Tells the kernel to not make use of any
IOAPICs that may be present in the system.
+ noautogroup Disable scheduler automatic task group creation.
+
nobats [PPC] Do not use BATs for mapping kernel lowmem
on "Classic" PPC cores.