Re: condvar performance in .59 vs .60

Jamie Lokier <[email protected]> Fri, 3 Oct 2003 07:28:39 +0100
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
Ulrich Drepper wrote:
> Jamie Lokier wrote:
> 
> > A synchronous wakeup is like that.  If you can use requeue now,
> > there's no need for it, although perhaps some userspace applications
> > would appreciate being able to unblock a mutex or whatever without
> > being preempted immediately?
> 
> It would definitely be worth a try.  I think many (most?) applications
> would benefit from the waker continue to run.

I agree for most apps, but there will be a few that get upset if they
wake another higher priority task and it does not run until this
task's timeslice completes (or whatever the synchronous wakeup
condition is).

I can imagine this happening if a compute-intensive thread wakes a GUI
thread to update the display, for example, and the compute-intensive
thread doesn't wish to sleep.

If you want to experiment, you can change the single occurrence of
wake_up_all() to wake_up_all_sync() in linux/kernel/futex.c.

-- Jamie