Re: [RFC/RFT PATCH v3] sched: automated per tty task groups
[Posted November 16, 2010 by corbet]
| From: |
| Lennart Poettering <mzxreary-AT-0pointer.de> |
| To: |
| Linus Torvalds <torvalds-AT-linux-foundation.org> |
| Subject: |
| Re: [RFC/RFT PATCH v3] sched: automated per tty task groups |
| Date: |
| Tue, 16 Nov 2010 19:16:03 +0100 |
| Message-ID: |
| <20101116181603.GC19327@tango.0pointer.de> |
| Cc: |
| Dhaval Giani <dhaval.giani-AT-gmail.com>,
Peter Zijlstra <a.p.zijlstra-AT-chello.nl>,
Mike Galbraith <efault-AT-gmx.de>,
Vivek Goyal <vgoyal-AT-redhat.com>,
Oleg Nesterov <oleg-AT-redhat.com>,
Markus Trippelsdorf <markus-AT-trippelsdorf.de>,
Mathieu Desnoyers <mathieu.desnoyers-AT-efficios.com>,
Ingo Molnar <mingo-AT-elte.hu>,
LKML <linux-kernel-AT-vger.kernel.org>,
Balbir Singh <balbir-AT-linux.vnet.ibm.com> |
| Archive-link: |
| Article, Thread
|
On Tue, 16.11.10 09:11, Linus Torvalds (torvalds@linux-foundation.org) wrote:
>
> On Tue, Nov 16, 2010 at 9:03 AM, Lennart Poettering
> <mzxreary@0pointer.de> wrote:
> >
> > Binding something like this to TTYs is just backwards.
>
> Numbers talk, bullshit walks.
>
> The numbers have been quoted. The clear interactive behavior has been seen.
Here's my super-complex patch btw, to achieve exactly the same thing
from userspace without involving any kernel or systemd patching and
kernel-side logic. Simply edit your own ~/.bashrc and add this to the end:
if [ "$PS1" ] ; then
mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$
echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks
fi
Then, as the superuser do this:
mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu
mkdir -m 0777 /sys/fs/cgroup/cpu/user
Done. Same effect. However: not crazy.
I am not sure I myself will find the time to prep some 'numbers' for
you. They'd be the same as with the kernel patch anyway. But I am sure
somebody else will do it for you...
Lennart
--
Lennart Poettering - Red Hat, Inc.
(
Log in to post comments)