Re: [PATCH] io stalls (was: -rc7 Re: Linux 2.4.21-rc6)

From: Andrea Arcangeli (
Date: Tue Jun 10 2003 - 19:33:57 EST

On Mon, Jun 09, 2003 at 05:39:23PM -0400, Chris Mason wrote:
> + if (!waitqueue_active(&q->wait_for_requests[rw]))
> + clear_queue_full(q, rw);

you've an smp race above, the smp safe implementation is this:

        if (!waitqueue_active(&q->wait_for_requests[rw])) {
                clear_queue_full(q, rw);
                if (unlikely(waitqueue_active(&q->wait_for_requests[rw])))

I'm also unsure what the "waited" logic does, it doesn't seem necessary.

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 : Sun Jun 15 2003 - 22:00:26 EST