[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test8-vmpatch performs great here!



Hi,

On Fri, Sep 08, 2000 at 08:29:43PM -0300, Rik van Riel wrote:

> This seems to be due to kflushd (bdflush) waking up
> tasks in LIFO order ...

Hmm??

> >From fs/buffer.c:
> 
> in wakeup_bdflush()
>    2435         __set_current_state(TASK_UNINTERRUPTIBLE);
>    2436         add_wait_queue(&bdflush_done, &wait);

> (which adds our task to the front of the wait queue)

Right, but it is TASK_UNINTERRUPTIBLE, not TASK_EXCLUSIVE.

> and in kflushd()
>    2622                 wake_up(&bdflush_done);
> 
> (which wakes up the first task on the wait queue)

No.  That might be true if we were TASK_EXCLUSIVE, but we are not ---
*all_ processes on the wait queue will be woken, and the scheduler
doesn't care in the slightest about which order they get woken in.  It
will just schedule the best process next time.
 
wake_up_all() is only different from wake_up() when you encounter
TASK_EXCLUSIVE processes.

Cheers,
 Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/