Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-04 Thread Srivatsa Vaddagiri
On Thu, Oct 04, 2007 at 05:32:17PM -0400, [EMAIL PROTECTED] wrote: > > Shouldn't that be done via uevents? E.g. UID x gets added to the sysfs tree, > > generates a uevent and a script then figures out the cpu_share and sets it. > > That would tend to be a tad racy - a site may want to set limits i

Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-04 Thread Valdis . Kletnieks
On Thu, 04 Oct 2007 10:54:51 +0200, Heiko Carstens said: > > echo 2048 > /sys/kernel/uids/500/cpu_share > > > > this should just work too, regardless of there not being any UID 500 > > tasks yet. Likewise, once configured, the /sys/kernel/uids/* directories > > (with the settings in them) shou

Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-04 Thread Srivatsa Vaddagiri
On Thu, Oct 04, 2007 at 12:02:01PM -0400, Bill Davidsen wrote: > >>i'm wondering about the following: could not (yet) existing UIDs be made > >>configurable too? I.e. if i do this in a bootup script: > >> > >> echo 2048 > /sys/kernel/uids/500/cpu_share > >> > >>this should just work too, regardle

Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-04 Thread Bill Davidsen
Heiko Carstens wrote: Changelog since v1: 1. Added a mutex to serialize directory creation/destruction for a user in sysfs 2. Added a spinlock in the task_group structure to serialize writes to tg->shares. 3. Removed /proc/root_user_cpu_shares. 4. Added Documentation about the group schedul

Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-04 Thread Heiko Carstens
> > Changelog since v1: > > 1. Added a mutex to serialize directory creation/destruction for a user in > >sysfs > > 2. Added a spinlock in the task_group structure to serialize writes to > >tg->shares. > > 3. Removed /proc/root_user_cpu_shares. > > 4. Added Documentation about the group sch

Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-04 Thread Ingo Molnar
* Dhaval Giani <[EMAIL PROTECTED]> wrote: > Hi Ingo, > > Can you please drop commit b1add858a10cece3a68b2d8cb9e7350843700a58 (last > version of this patch) and try this instead? > Changelog since v1: > 1. Added a mutex to serialize directory creation/destruction for a user in >sysfs > 2. Ad

[RFC/PATCH -v2] Add sysfs control to modify a user's cpu share

2007-10-03 Thread Dhaval Giani
Hi Ingo, Can you please drop commit b1add858a10cece3a68b2d8cb9e7350843700a58 (last version of this patch) and try this instead? --- Adds tunables in sysfs to modify a user's cpu share. A directory is created in sysfs for each new user in the system. /sys/kernel/uids//cpu_share Reading t