[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101130135959.GA20703@elte.hu>
Date: Tue, 30 Nov 2010 14:59:59 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Mike Galbraith <efault@....de>, Paul Turner <pjt@...gle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] sched: automated per session task groups
* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Tue, 2010-11-30 at 14:18 +0100, Mike Galbraith wrote:
> >
> > From: Mike Galbraith <efault@....de>
> > Date: Tue Nov 30 14:07:12 CET 2010
> > Subject: [PATCH] sched: Improve desktop interactivity: Implement automated per session task groups
> >
> > 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. Currently, only per session autogroups
> > are implemented, but the patch 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(),
> > a new task group is created, the process is moved into the new task group,
> > and a reference to the preveious task group is dropped. Child processes
> > inherit this task group thereafter, and increase it's refcount. When the
> > last thread of a process exits, the process's reference is dropped, such
> > that when the last process referencing an autogroup exits, the autogroup
> > is destroyed.
> >
> > At runqueue selection time, IFF a task has no cgroup assignment, its 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=y is
> > selected, but can be disabled via the boot option noautogroup, and can 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@....de>
> > Cc: Oleg Nesterov <oleg@...hat.com>
> > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> > Cc: Markus Trippelsdorf <markus@...ppelsdorf.de>
> > Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> > LKML-Reference: <1290281700.28711.9.camel@...gy.simson.net>
> > Signed-off-by: Ingo Molnar <mingo@...e.hu>
>
> Looks good to me, Thanks Mike!
>
> Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Ok, great!
I've queued it up in tip:sched/core and started testing it - will push it out if it
passes basic tests. Added Linus's Acked-by - i presume that's still valid for v4 as
well, right?
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists