Re: 2.4.20: Proccess stuck in __lock_page ...

Andrea Arcangeli (andrea@suse.de)
Thu, 29 May 2003 14:52:55 +0200


On Wed, May 28, 2003 at 01:17:59PM +0200, Marc-Christian Petersen wrote:
> On Wednesday 28 May 2003 12:59, Andrew Morton wrote:
>
> Hi Andrew,
>
> > 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.
> Does the attached one make sense?

btw, I already fixed this race in my tree:

void blkdev_release_request(struct request *req)
{
request_queue_t *q = req->q;

req->rq_status = RQ_INACTIVE;
req->q = NULL;

/*
* Request may not have originated from ll_rw_blk. if not,
* assume it has free buffers and check waiters
*/
if (q) {
list_add(&req->queue, &q->rq.free);
if (++q->rq.count >= q->batch_requests && !blk_oversized_queue_batch(q)) {
smp_mb();
if (waitqueue_active(&q->wait_for_requests))
wake_up(&q->wait_for_requests);

so if this was this one my tree wouldn't exibith it (and it would
trigger on smp only).

>
> ciao, Marc
>
>

Andrea
-
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/