[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101116191233.GE13092@redhat.com>
Date: Tue, 16 Nov 2010 14:12:33 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Stephen Clark <sclark46@...thlink.net>
Cc: Lennart Poettering <mzxreary@...inter.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Dhaval Giani <dhaval.giani@...il.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Mike Galbraith <efault@....de>,
Oleg Nesterov <oleg@...hat.com>,
Markus Trippelsdorf <markus@...ppelsdorf.de>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
Balbir Singh <balbir@...ux.vnet.ibm.com>
Subject: Re: [RFC/RFT PATCH v3] sched: automated per tty task groups
On Tue, Nov 16, 2010 at 01:57:33PM -0500, Stephen Clark wrote:
> On 11/16/2010 01:16 PM, Lennart Poettering wrote:
> >On Tue, 16.11.10 09:11, Linus Torvalds (torvalds@...ux-foundation.org) wrote:
> >
> >>On Tue, Nov 16, 2010 at 9:03 AM, Lennart Poettering
> >><mzxreary@...inter.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
> >
> So you have tested this and have a nice demo and numbers to back it up?
I just modified my .bashrc and for my each ssh session, it seems to
be working fine and creating a cgroup as soon as I ssh into the box.
Just that it will need little modification to reap the group automatically
when shell exits.
Thanks
Vivek
--
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