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

2007-10-02 Thread Srivatsa Vaddagiri
On Tue, Oct 02, 2007 at 06:12:39PM -0400, Eric St-Laurent wrote: > While a sysfs interface is OK and somewhat orthogonal to the interface > proposed the containers patches, I think maybe a new syscall should be > considered. We had discussed syscall vs filesystem based interface for resource manag

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

2007-10-02 Thread Eric St-Laurent
On Mon, 2007-10-01 at 16:44 +0200, Ingo Molnar wrote: > > 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 this file returns the cpu shares granted for the user.

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

2007-10-01 Thread Srivatsa Vaddagiri
On Mon, Oct 01, 2007 at 12:12:21PM -0400, Dave Jones wrote: > Can we start adding stuff to Documentation/ for new files created > in sysfs ? There's so much undocumented stuff in there now that > it's unfunny. Hi Dave, We will in the next version of the patch. At this point, the patch was

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

2007-10-01 Thread Dave Jones
On Mon, Oct 01, 2007 at 07:34:54PM +0530, Dhaval Giani wrote: > Hi Ingo, > > 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 this file returns the cpu shares grant

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

2007-10-01 Thread Srivatsa Vaddagiri
On Mon, Oct 01, 2007 at 04:44:02PM +0200, Ingo Molnar wrote: > but there seems to be a bug in it, i get this: > > kobject_add failed for 500 with -EEXIST, don't try to register things with > the same name in the same directory. Looks like a remove_dir/create_dir race .. free_user()

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

2007-10-01 Thread Ingo Molnar
hi Dhaval, * Dhaval Giani <[EMAIL PROTECTED]> wrote: > Hi Ingo, > > 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 this file returns the cpu shares granted for the use

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

2007-10-01 Thread Dhaval Giani
Hi Ingo, 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 this file returns the cpu shares granted for the user. Writing into this file modifies the cpu share for the user. Only an