public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] new fifo I/O elevator that really does nothing at all
Date: Tue, 29 Mar 2005 10:06:03 +0200	[thread overview]
Message-ID: <20050329080559.GD16636@suse.de> (raw)
In-Reply-To: <200503290148.j2T1mOg25279@unix-os.sc.intel.com>

On Mon, Mar 28 2005, Chen, Kenneth W wrote:
> The noop elevator is still too fat for db transaction processing
> workload.  Since the db application already merged all blocks before
> sending it down, the I/O presented to the elevator are actually not
> merge-able anymore. Since I/O are also random, we don't want to sort
> them either.  However the noop elevator is still doing a linear search
> on the entire list of requests in the queue.  A noop elevator after
> all isn't really noop.
> 
> We are proposing a true no-op elevator algorithm, no merge, no
> nothing. Just do first in and first out list management for the I/O
> request.  The best name I can come up with is "FIFO".  I also piggy
> backed the code onto noop-iosched.c.  I can easily pull those code
> into a separate file if people object.  Though, I hope Jens is OK with
> it.

It's not quite ok, because you don't honor the insertion point in
fifo_add_request. The only 'fat' part of the noop io scheduler is the
merge stuff, the original plan was to move that to a hash table lookup
instead like the other io schedulers do. So I would suggest just
changing noop to hash the request on the end point for back merges and
forget about front merges, since they are rare anyways. Hmm actually,
the last merge hint should catch most of the merges at almost zero cost.
How about this patch?

Signed-off-by: Jens Axboe <axboe@suse.de>

===== drivers/block/noop-iosched.c 1.7 vs edited =====
--- 1.7/drivers/block/noop-iosched.c	2005-01-14 17:35:40 +01:00
+++ edited/drivers/block/noop-iosched.c	2005-03-29 10:05:21 +02:00
@@ -13,34 +13,13 @@
 static int elevator_noop_merge(request_queue_t *q, struct request **req,
 			       struct bio *bio)
 {
-	struct list_head *entry = &q->queue_head;
-	struct request *__rq;
 	int ret;
 
-	if ((ret = elv_try_last_merge(q, bio))) {
+	ret = elv_try_last_merge(q, bio);
+	if (ret != ELEVATOR_NO_MERGE)
 		*req = q->last_merge;
-		return ret;
-	}
 
-	while ((entry = entry->prev) != &q->queue_head) {
-		__rq = list_entry_rq(entry);
-
-		if (__rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER))
-			break;
-		else if (__rq->flags & REQ_STARTED)
-			break;
-
-		if (!blk_fs_request(__rq))
-			continue;
-
-		if ((ret = elv_try_merge(__rq, bio))) {
-			*req = __rq;
-			q->last_merge = __rq;
-			return ret;
-		}
-	}
-
-	return ELEVATOR_NO_MERGE;
+	return ret;
 }
 
 static void elevator_noop_merge_requests(request_queue_t *q, struct request *req,

-- 
Jens Axboe


  reply	other threads:[~2005-03-29  8:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-29  1:48 [patch] new fifo I/O elevator that really does nothing at all Chen, Kenneth W
2005-03-29  8:06 ` Jens Axboe [this message]
2005-03-29 18:50   ` Chen, Kenneth W
2005-03-29 20:04     ` Jens Axboe
2005-03-29 20:07       ` Chen, Kenneth W
2005-04-05 14:54         ` Jens Axboe
2005-04-06  0:12           ` Chen, Kenneth W
2005-03-29 22:20   ` Bill Davidsen
2005-03-30  7:13     ` Jens Axboe
     [not found] <7A4826DE8867D411BAB8009027AE9EB91DB47626@scsmsx401.amr.corp.intel.com>
2005-04-12 17:58 ` Chen, Kenneth W
2005-04-13  7:45   ` 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=20050329080559.GD16636@suse.de \
    --to=axboe@suse.de \
    --cc=kenneth.w.chen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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