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) should probably not go away either. > > 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 in the hypothetical /sys/kernel/uids/NNN before the program has a chance to fork-bomb or otherwise make it difficult to set a limitfrom within another userspace process. It's similar to why you want a process to be launched with all its ulimit's set, rather than set them after the fork/exec happens...
Attachment:
pgpzlcrVceqA5.pgp
Description: PGP signature
- Follow-Ups:
- Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- From: Srivatsa Vaddagiri <[email protected]>
- Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- References:
- [RFC/PATCH] Add sysfs control to modify a user's cpu share
- From: Dhaval Giani <[email protected]>
- Re: [RFC/PATCH] Add sysfs control to modify a user's cpu share
- From: Ingo Molnar <[email protected]>
- [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- From: Dhaval Giani <[email protected]>
- Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- From: Ingo Molnar <[email protected]>
- Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- From: Heiko Carstens <[email protected]>
- [RFC/PATCH] Add sysfs control to modify a user's cpu share
- Prev by Date: Re: [PATCH 4/5] writeback: remove pages_skipped accounting in __block_write_full_page()
- Next by Date: Re: [BUG] Linux 2.6.23-rc9 and MAX_ARG_PAGES
- Previous by thread: Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- Next by thread: Re: [RFC/PATCH -v2] Add sysfs control to modify a user's cpu share
- Index(es):