Re: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Preemption Patch

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Re: [announce] [patch] Voluntary Kernel Preemption Patch
From: Andrew Morton (akpm_AT_osdl.org)
Date: Wed Jul 14 2004 - 02:06:28 EEST


Andrea Arcangeli <andrea_AT_suse.de> wrote:
>
> What I'm doing is basically to replace all might_sleep with cond_resched

I cannot see a lot of point in that. They are semantically different
things and should look different in the source.

And it's currently OK to add a might_sleep() to (say) an inline path which
is expended a zillion times because we know it'll go away for production
builds. If those things become cond_resched() calls instead, the code
increase will be permanent.

> cond_resched_lock is another story of course.

cond_resched_lock() doesn't work on SMP. I'll probably be removing it in
favour of unconditionally dropping the lock every N times around the loop,
to allow the other CPU (the one with need_resched() true) to get in there
and take it.

And please let me repeat: preemption is the way in which we wish to provide
low-latency. At this time, patches which sprinkle cond_resched() all over
the place are unwelcome. After 2.7 forks we can look at it again.

I've yet to go through Arjan's patch - I suspect a lot of it is not needed.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jul 14 2004 - 21:03:02 EEST