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

Srivatsa Vaddagiri
2007-10-01T16:26:39Z

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
sent out to get an idea of whether sysfs is the right place for this interface
or not.

> A great start would be 'wtf is a cpu_share and why would I want to
> change it' ?

Quick answer before we release the next version : This has to do with
the CONFIG_FAIR_USER_SCHED feature which allows dividing CPU bandwidth
equally between all users of a system. Before this patch, CPU bandwidth was
divided equally among all non-root users. After this patch, it will
be possible to control CPU bandwidth allocation to each user separately.

For ex: by setting user "vatsa"'s cpu_share to be twice that of user
"guest", it would be possible for user "vatsa" to get 2x CPU bandwidth that of
user "guest"

--
Regards,
vatsa