public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: plug problem in linux-2.4.0-test11
Date: Wed, 29 Nov 2000 19:11:57 +0100	[thread overview]
Message-ID: <20001129191157.A30394@suse.de> (raw)
In-Reply-To: <20001129152308.A28399@suse.de> <Pine.LNX.4.10.10011290949520.11951-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.10.10011290949520.11951-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Wed, Nov 29, 2000 at 09:52:01AM -0800

On Wed, Nov 29 2000, Linus Torvalds wrote:
> I would much rather actually go back to the original setup, which did
> nothing at all if the queue wasn't plugged in the first place.

But that potentially breaks devices that either don't use plugging
or alternatively implement their own, because q->plugged will not
get set and the unplug from __get_request_wait does nothing. It's
clear that the plug/noplug is too coarse. Anyway, I don't think
there's currently a problem with the old setup for any in-kernel
drivers so I'm fine with reverting to that behaviour for now.

> I think that we should strive for a setup that calls "request_fn" only to
> start new IO, and that expects the low-level driver to be able to do the
> whole request queue until it is empty. Then we re-start it the next time
> around.

Yes agreed.

--- drivers/block/ll_rw_blk.c~	Wed Nov 29 15:17:33 2000
+++ drivers/block/ll_rw_blk.c	Wed Nov 29 19:04:50 2000
@@ -347,9 +347,10 @@
  */
 static inline void __generic_unplug_device(request_queue_t *q)
 {
-	if (!list_empty(&q->queue_head)) {
+	if (q->plugged) {
 		q->plugged = 0;
-		q->request_fn(q);
+		if (!list_empty(&q->queue_head))
+			q->request_fn(q);
 	}
 }
 
-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-29 18:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-29 11:56 plug problem in linux-2.4.0-test11 schwidefsky
2000-11-29 14:23 ` Jens Axboe
2000-11-29 17:52   ` Linus Torvalds
2000-11-29 18:11     ` Jens Axboe [this message]
2000-12-27 20:04 ` Andrea Arcangeli
2000-12-28 13:47   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001129191157.A30394@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox