public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix IO hangs
@ 2003-09-05  6:56 Nick Piggin
  2003-09-05  7:04 ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Piggin @ 2003-09-05  6:56 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Jens Axboe; +Cc: linux-kernel

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

Hi, sorry for the hangs, everyone. I think I have it worked out, but
testers and an ack from Jens would be good.

The insert_here code now does as advertised. The big difference being
that regular blk_fs_requests will be subject to it (required for SCSI
requeue). Unfortunately ll_rw_blk.c misuses it and will sometimes try
to insert at requests which are not on the dispatch list, causing the
badness.

It looks like the code was maybe used to provide an insertion hint
for the elevator. The RB tree has now eliminated that requirement even
if the code did work. Which it doesn't.

I can't reproduce the hangs with this patch. Please test.


Aside, insert_here really seems to be quite dangerous to me. I think
combination of barriers and an "insert at start/end" flag would be
enough.


[-- Attachment #2: elv-insert_here-fix --]
[-- Type: text/plain, Size: 379 bytes --]

--- archs/linux-2.6/drivers/block/ll_rw_blk.c	2003-09-05 16:46:02.000000000 +1000
+++ linux-2.6/drivers/block/ll_rw_blk.c	2003-09-05 16:35:39.000000000 +1000
@@ -2060,7 +2060,7 @@ get_rq:
 	req->rq_disk = bio->bi_bdev->bd_disk;
 	req->start_time = jiffies;
 
-	add_request(q, req, insert_here);
+	add_request(q, req, NULL);
 out:
 	if (freereq)
 		__blk_put_request(q, freereq);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-09-06  1:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-05  6:56 [PATCH] fix IO hangs Nick Piggin
2003-09-05  7:04 ` Jens Axboe
2003-09-05  7:16   ` Nick Piggin
2003-09-05  7:18     ` Jens Axboe
2003-09-05  8:31       ` Jens Axboe
2003-09-05 22:03         ` Martin Schlemmer
2003-09-06  1:34           ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox