lkml.org 
[lkml]   [2009]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-06-03 16:11    [W:0.059 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site