Re: 2.4.20: Proccess stuck in __lock_page ...

Andrew Morton (akpm@digeo.com)
Wed, 28 May 2003 03:59:39 -0700


Jens Axboe <axboe@suse.de> wrote:
>
> > THIS IS IT! The last one. No pauses writing a 2Gb file now unless I do a read
> > midstream.
>
> Cool, especially since we can easily apply this to -rc5 without any
> worries. Marcelo, if you please...?
>
> ===== drivers/block/ll_rw_blk.c 1.44 vs edited =====
> --- 1.44/drivers/block/ll_rw_blk.c Mon Apr 14 12:53:03 2003
> +++ edited/drivers/block/ll_rw_blk.c Wed May 28 12:49:30 2003
> @@ -829,8 +829,7 @@
> */
> if (q) {
> list_add(&req->queue, &q->rq[rw].free);
> - if (++q->rq[rw].count >= q->batch_requests &&
> - waitqueue_active(&q->wait_for_requests[rw]))
> + if (++q->rq[rw].count >= q->batch_requests)
> wake_up(&q->wait_for_requests[rw]);
> }
> }

umm, I'd like confirmation of that.

The waitqueue_active() test is wrong because of a missing barrier, but only
on SMP. And if it does make a mistake it will surely correct itself when the
next request is put back. (That's why I left it there...)

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