Messages in this thread | | | Date | Wed, 3 Jun 2009 16:07:43 +0200 | From | Lennart Poettering <> | Subject | Re: [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, Second try |
| |
On Fri, 29.05.09 10:38, Lennart Poettering (mzxreary@0pointer.de) wrote:
> This patch introduces a new flag SCHED_RESET_ON_FORK which can be passed > to the kernel via sched_setscheduler(), ORed in the policy parameter. If > set this will make sure that when the process forks a) the scheduling > priority is reset to DEFAULT_PRIO if it was higher and b) the scheduling > policy is reset to SCHED_NORMAL if it was either SCHED_FIFO or SCHED_RR.
[...]
> This current patch compiles but is not otherwise tested. For now, I am > sending this primarily as a request for comments. So please, I'd love to > hear your comments!
I have now done some testing to make sure it actually works as advertised. Everything seems to be fine. For those interested here's a little test program that verifies that RR scheduling is properly removed from the child process but is kept enabled in the parent process:
http://0pointer.de/public/reset-on-fork.c
Ingo, how can I bribe you into taking this patch, or at least commenting on it?
Thanks,
Lennart
-- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4
| |