Re: wake_up vs. wake_up_sync

From: Mike Kravetz (
Date: Wed Jun 27 2001 - 16:38:45 EST

On Wed, Jun 27, 2001 at 11:22:19PM +0200, Manfred Spraul wrote:
> > Why would you want to prevent
> > reschedule_idle()?
> >
> If one process runs, wakes up another process and _knows_ that it's
> going to sleep immediately after the wake_up it doesn't need the
> reschedule_idle: the current cpu will be idle soon, the scheduler
> doesn't need to find another cpu for the woken up thread.

I'm curious. How does the caller of wake_up_sync know that the
current cpu will soon be idle. Does it assume that there are no
other tasks on the runqueue waiting for a CPU? If there are other
tasks on the runqueue, isn't it possible that another task has a
higher goodness value than the task being awakened. In such a case,
isn't is possible that the awakened task could sit on the runqueue
(waiting for a CPU) while tasks with a lower goodness value are
allowed to run?

Mike Kravetz                       
IBM Linux Technology Center
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:17 EST