All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BK PATCHES] add ata scsi driver
Date: Tue, 27 May 2003 08:54:36 +0200	[thread overview]
Message-ID: <20030527065436.GX845@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0305261429550.13489-100000@home.transmeta.com>

On Mon, May 26 2003, Linus Torvalds wrote:
> 
> On Mon, 26 May 2003, Jens Axboe wrote:
> > 
> > > Think of all the fairness issues we've had in the elevator code, and 
> > > realize that the low-level disk probably implements _none_ of those 
> > > fairness algorithms.
> > 
> > I think it does, to some extent at least.
> 
> I doubt they do a very good job of it. I know of bad cases, even with 
> "high-end" hardware. Sure, we can hope that it's getting better, but do we 
> want to bet on it.

No I agree, it's always nice to handle these cases in software so we
don't have to rely on these things getting fixed.

> > > Hmm.. Where does it keep track of request latency for requests that have 
> > > been removed from the queue?
> > 
> > Well, it doesn't...
> 
> Yeah. Which means that right now _really_ long starvation will show up as
> timeouts, while other cases will just show up as bad latency.
> 
> Which will _work_, of course (assuming the timeout handling is correct,
> which is a big if in itself), but it still sucks from a usability
> standpoint.
> 
> Even if we drop our timeouts from 30 seconds (or whatever they are now)
> down to just a few seconds, that's a _loooong_ time, and we should be a
> lot more proactive about things. Audio/video stuff tends to want things
> with latencies in the tenth-of-a-second range, even when they buffer
> things up internally to hide the worst cases.

Here's something ridicolously simple, that just wont start a new tag if
the oldest tag is older than 100ms. Clearly nothing for submission, but
it gets the point across.

Now only look at reads, and we've got something a little useful at
least.

James, speaking of queue localities and tcq... Doug mentioned some time
ago that aic7xxx dishes out tags numbers from a hba pool which makes it
impossible to support with out current block layer queueing code. Maybe
it we associate the blk_queue_tag structure with a bunch of queues
instead of having a 1:1 mapping it could work.

===== drivers/block/ll_rw_blk.c 1.170 vs edited =====
--- 1.170/drivers/block/ll_rw_blk.c	Thu May  8 11:30:11 2003
+++ edited/drivers/block/ll_rw_blk.c	Tue May 27 08:44:44 2003
@@ -574,6 +574,13 @@
 		BUG();
 	}
 
+	if (!list_empty(&bqt->busy_list)) {
+		struct request *__rq = list_entry_rq(bqt->busy_list.prev);
+
+		if (time_after(rq->timeout, jiffies))
+			return 1;
+	}
+
 	for (map = bqt->tag_map; *map == -1UL; map++) {
 		tag += BLK_TAGS_PER_LONG;
 
@@ -589,6 +596,7 @@
 	bqt->tag_index[tag] = rq;
 	blkdev_dequeue_request(rq);
 	list_add(&rq->queuelist, &bqt->busy_list);
+	rq->timeout = jiffies + HZ / 10;
 	bqt->busy++;
 	return 0;
 }

-- 
Jens Axboe


  parent reply	other threads:[~2003-05-27  6:41 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-26 18:12 [BK PATCHES] add ata scsi driver James Bottomley
2003-05-26 18:18 ` Jens Axboe
2003-05-26 18:47   ` James Bottomley
2003-05-26 19:07     ` Jens Axboe
2003-05-26 19:17       ` James Bottomley
2003-05-26 19:33         ` Jens Axboe
2003-05-27 12:39           ` Jens Axboe
2003-05-27 14:26             ` James Bottomley
2003-05-27 17:16               ` Jens Axboe
2003-05-27 18:09                 ` James Bottomley
2003-05-27 18:21                   ` Jens Axboe
2003-05-27 18:30                     ` James Bottomley
2003-05-26 20:27         ` Linus Torvalds
2003-05-26 20:36           ` James Bottomley
2003-05-26 20:45             ` Linus Torvalds
2003-05-26 20:51               ` Jens Axboe
2003-05-26 20:56               ` James Bottomley
2003-05-26 20:38           ` Jens Axboe
2003-05-26 20:49             ` Linus Torvalds
2003-05-26 20:57               ` Jens Axboe
2003-05-26 21:34                 ` Linus Torvalds
2003-05-26 23:58                   ` Nick Piggin
2003-05-27  0:09                     ` Linus Torvalds
2003-05-27  0:49                       ` Nick Piggin
2003-05-27  0:16                   ` Alan Cox
2003-05-27  6:54                   ` Jens Axboe [this message]
2003-05-27 14:20                     ` James Bottomley
2003-05-27 14:36                     ` Linus Torvalds
2003-05-27 14:59                       ` James Bottomley
2003-05-27 15:21                         ` Jeff Garzik
2003-05-27 15:38                           ` James Bottomley
2003-05-27 15:50                             ` Jeff Garzik
2003-05-27 16:00                               ` James Bottomley
2003-05-27 16:16                                 ` Jeff Garzik
2003-05-28  9:35                                   ` Christoph Hellwig
2003-05-28 10:50                           ` Lincoln Dale
2003-05-27 19:43                       ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2003-05-26  4:58 Jeff Garzik
2003-05-26  5:15 ` Linus Torvalds
2003-05-26  5:30   ` Jeff Garzik
2003-05-26  5:36     ` Jeff Garzik
2003-05-26  5:42       ` Linus Torvalds
2003-05-26  6:01         ` Jeff Garzik
2003-05-26 16:56           ` Linus Torvalds
2003-05-26 17:47             ` Jeff Garzik
2003-05-26 20:09               ` Linus Torvalds
2003-05-27  0:29                 ` Alan Cox
2003-05-27  6:07                 ` Jeff Garzik
2003-05-27  6:30                   ` Linus Torvalds
2003-05-27  6:51                     ` Linus Torvalds
2003-05-27  7:29                       ` Jeff Garzik
2003-05-26  5:40     ` Linus Torvalds
2003-05-26  5:53       ` Jeff Garzik
2003-05-26  6:21         ` Jeff Garzik
2003-05-26 16:57           ` Linus Torvalds
2003-05-26 17:24             ` Jens Axboe
2003-05-26 17:54               ` Jeff Garzik
2003-05-26 17:59               ` Jeff Garzik
2003-05-26 18:11                 ` Jens Axboe
2003-05-27  0:22       ` Alan Cox
2003-05-27  4:15         ` Linus Torvalds
2003-05-26 10:32     ` Bartlomiej Zolnierkiewicz
2003-05-26 11:13       ` Jeff Garzik
2003-05-26 11:37         ` Bartlomiej Zolnierkiewicz
2003-05-26  5:59 ` Benjamin Herrenschmidt
2003-05-26  6:03   ` Jeff Garzik
2003-06-02  9:46 ` Andre Hedrick
2003-06-02 13:56   ` Alan Cox

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=20030527065436.GX845@suse.de \
    --to=axboe@suse.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.