Re: [announce] [patch] Voluntary Kernel Preemption Patch

Christoph Hellwig
2004-07-09T19:51:09Z

> unlike the lowlatency patches, this patch doesn't add a lot of new
> scheduling points to the source code, it rather reuses a rich but
> currently inactive set of scheduling points that already exist in the
> 2.6 tree: the might_sleep() debugging checks. Any code point that does
> might_sleep() is in fact ready to sleep at that point. So the patch
> activates these debugging checks to be scheduling points. This reduces
> complexity and impact quite significantly.

I don't think this is a good idea. Just because a function might sleep
it doesn't mean it should sleep. I'd rather add the might_sleep() to
cond_resched() and replace the former with the latter in the cases where
it makes sense.