Re: 2.6.6-rc3-mm2

From: Oleg Nesterov
Date: Wed May 05 2004 - 12:18:51 EST


Hello.

William Lee Irwin III wrote:
>
> On Wed, May 05, 2004 at 04:17:05PM +0400, Oleg Nesterov wrote:
> > also, exclusive wakeups have no problems, and process
> > waiting in wait_on_page_writeback() won't be waken
> > by unlock_page(). it will be waken _only_ when that
> > bit will be cleared.
>
> The object isn't passed down to the wake function at all, so it can't
> avoid falsely scheduling waiters on the wrong objects and/or bits.

I think you are wrong. __wake_up_common() calls wait_queue_t().func,
which is wake_bit_function(). It casts wait argument to wait_bit_queue,
and checks test_bit(wait_bit->bit_nr, wait_bit->flags) in _waker_
context, and wakes up wait->task _only_ if that bit is cleared,
so there is no false wakeups.

Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/