Re: [PATCH sched-devel] Generate uevents for user creation/destruction

Ingo Molnar
2007-10-10T07:42:47Z

* Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> 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 way you also don't need to keep the
> > directories. No?
>
> Heiko,
> Thanks for the hint. Here's a patch to enable generation of
> uevents for user creation/deletion. These uevents can be handled in
> userspace to configure a new user's cpu share.
>
> Note : After bootup I could test that new user's cpu share is
> configured as per a configuration file (/etc/user_cpu_share.conf).
> However this mechanism didnt work for root user. Perhaps uevent for
> root user is generated way too early?
>
> A HOWTO text file is also attached explaining how to make use of these
> uevents in userspace.
>
> Ingo,
> This patch applies on top of latest sched-devel tree. Pls
> review and apply ..

thanks, applied. This looks reassuringly simple and straightforward!

Ingo