Re: 2.4.20: Proccess stuck in __lock_page ...

Marc-Christian Petersen
2003-05-28T11:05:20Z

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

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

[-- Attachment #2: llrwblk.patch --]
[-- Type: text/x-diff, Size: 478 bytes --]

--- 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]);
+ }
}
}