lkml.org 
[lkml]   [2000]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: RFC: request merges with active heads
On Wed, Jan 26 2000, Jens Axboe wrote:
> for the first block and a second with the rest merged. I propose
> that we add a RQ_STARTED flag or similar to let ll_rw_blk determine
> whether it is safe to merge with the current_request for drivers
> that have an active request head.

A better way to handle this, as suggested to me by Eric Youngdale,
is to check whether the device is plugged or not. If the device
is plugged we can safely assume that the request is currently
not being worked and in that case there's no need to skip that
entry while merging, because a queue is never plugged while
it has entries on it and a request cannot become active while
a queue is plugged.

--
* Jens Axboe <axboe@suse.de>
* Linux CD-ROM Maintainer
* http://www.kernel.dk
--- ll_rw_blk.c~ Wed Jan 26 17:48:56 2000
+++ ll_rw_blk.c Wed Jan 26 17:49:57 2000
@@ -589,7 +589,7 @@
goto get_rq;
}

- if (q->head_active) {
+ if (q->head_active && !q->plugged) {
/*
* The scsi disk and cdrom drivers completely remove the request
* from the queue when they start processing an entry. For this
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.026 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site