Re: 2.4.20: Proccess stuck in __lock_page ...

Marc-Christian Petersen (m.c.p@wolk-project.de)
Wed, 28 May 2003 13:17:59 +0200


--Boundary-00=_nrJ1+OBUVsgVJg1
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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?

ciao, Marc

--Boundary-00=_nrJ1+OBUVsgVJg1
Content-Type: text/x-diff;
charset="iso-8859-1";
name="llrwblk.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="llrwblk.patch"

--- old/drivers/block/ll_rw_blk.c 2003-05-14 23:11:08.000000000 +0200
+++ new/drivers/block/ll_rw_blk.c 2003-05-28 13:04:34.000000000 +0200
@@ -829,9 +829,10 @@ void blkdev_release_request(struct reque
*/
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) {
+ smp_mb();
wake_up(&q->wait_for_requests[rw]);
+ }
}
}

--Boundary-00=_nrJ1+OBUVsgVJg1--

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