mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tahsin Erdogan <tahsin@google.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, nauman@google.com, tytso@mit.edu,
	Tahsin Erdogan <tahsin@google.com>
Subject: [PATCH] noop-iosched: do not attempt to sort requests
Date: Thu, 23 Jul 2015 14:20:14 -0700	[thread overview]
Message-ID: <1437686414-19941-1-git-send-email-tahsin@google.com> (raw)

Noop scheduler currently dispatches a request by calling
elv_dispatch_sort(). In practice, sorting does not occur because
__elv_next_request() asks the io scheduler to dispatch a request
only when elevator queue is empty.

Also, not reordering requests seems more appropriate for noop. This
change makes the behavior more explicit.

Reviewed-by: Nauman Rafique <nauman@google.com>
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
---
 block/Kconfig.iosched | 8 ++++----
 block/noop-iosched.c  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
index 421bef9..b9e42f8 100644
--- a/block/Kconfig.iosched
+++ b/block/Kconfig.iosched
@@ -7,10 +7,10 @@ config IOSCHED_NOOP
 	default y
 	---help---
 	  The no-op I/O scheduler is a minimal scheduler that does basic merging
-	  and sorting. Its main uses include non-disk based block devices like
-	  memory devices, and specialised software or hardware environments
-	  that do their own scheduling and require only minimal assistance from
-	  the kernel.
+	  only. Its main uses include non-disk based block devices like memory
+	  devices, and specialised software or hardware environments that do
+	  their own scheduling and require only minimal assistance from the
+	  kernel.
 
 config IOSCHED_DEADLINE
 	tristate "Deadline I/O scheduler"
diff --git a/block/noop-iosched.c b/block/noop-iosched.c
index 3de89d4..f0fec14 100644
--- a/block/noop-iosched.c
+++ b/block/noop-iosched.c
@@ -26,7 +26,7 @@ static int noop_dispatch(struct request_queue *q, int force)
 		struct request *rq;
 		rq = list_entry(nd->queue.next, struct request, queuelist);
 		list_del_init(&rq->queuelist);
-		elv_dispatch_sort(q, rq);
+		elv_dispatch_add_tail(q, rq);
 		return 1;
 	}
 	return 0;
-- 
2.4.3.573.g4eafbef


             reply	other threads:[~2015-07-23 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 21:20 Tahsin Erdogan [this message]
2015-07-30  5:49 ` Tahsin Erdogan

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=1437686414-19941-1-git-send-email-tahsin@google.com \
    --to=tahsin@google.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nauman@google.com \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®