From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Lubos Lunak <l.lunak@suse.cz>,
Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: [PATCH 2/7] iosched: introduce parameter deadline.reada_expire
Date: Sat, 24 Jun 2006 10:04:00 +0800 [thread overview]
Message-ID: <351116971.08470@ustc.edu.cn> (raw)
Message-ID: <20060624024257.537043377@localhost.localdomain> (raw)
In-Reply-To: 20060624020358.719251923@localhost.localdomain
[-- Attachment #1: iosched-reada-deadline.patch --]
[-- Type: text/plain, Size: 2760 bytes --]
Introduce parameter reada_expire to the deadline elevator.
It avoids readahead requests contending with read requests,
and helps improve latency/throughput when there's many concurrent readers.
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
--- linux-2.6.17-rc6-mm2.orig/block/deadline-iosched.c
+++ linux-2.6.17-rc6-mm2/block/deadline-iosched.c
@@ -19,7 +19,8 @@
/*
* See Documentation/block/deadline-iosched.txt
*/
-static const int read_expire = HZ / 2; /* max time before a read is submitted. */
+static const int read_expire = HZ / 2; /* max time before an _impending_ read is submitted. */
+static const int reada_expire = 60 * HZ;/* max time before a read-ahead is submitted. */
static const int write_expire = 5 * HZ; /* ditto for writes, these limits are SOFT! */
static const int writes_starved = 2; /* max times reads can starve a write */
static const int fifo_batch = 16; /* # of sequential requests treated as one
@@ -56,7 +57,7 @@ struct deadline_data {
/*
* settings that change how the i/o scheduler behaves
*/
- int fifo_expire[2];
+ int fifo_expire[4];
int fifo_batch;
int writes_starved;
int front_merges;
@@ -711,7 +712,9 @@ static void *deadline_init_queue(request
dd->sort_list[READ] = RB_ROOT;
dd->sort_list[WRITE] = RB_ROOT;
dd->fifo_expire[READ] = read_expire;
+ dd->fifo_expire[READA] = reada_expire;
dd->fifo_expire[WRITE] = write_expire;
+ dd->fifo_expire[WRITEA] = write_expire;
dd->writes_starved = writes_starved;
dd->front_merges = 1;
dd->fifo_batch = fifo_batch;
@@ -780,6 +783,7 @@ static ssize_t __FUNC(elevator_t *e, cha
return deadline_var_show(__data, (page)); \
}
SHOW_FUNCTION(deadline_read_expire_show, dd->fifo_expire[READ], 1);
+SHOW_FUNCTION(deadline_reada_expire_show, dd->fifo_expire[READA], 1);
SHOW_FUNCTION(deadline_write_expire_show, dd->fifo_expire[WRITE], 1);
SHOW_FUNCTION(deadline_writes_starved_show, dd->writes_starved, 0);
SHOW_FUNCTION(deadline_front_merges_show, dd->front_merges, 0);
@@ -803,6 +807,7 @@ static ssize_t __FUNC(elevator_t *e, con
return ret; \
}
STORE_FUNCTION(deadline_read_expire_store, &dd->fifo_expire[READ], 0, INT_MAX, 1);
+STORE_FUNCTION(deadline_reada_expire_store, &dd->fifo_expire[READA], 0, INT_MAX, 1);
STORE_FUNCTION(deadline_write_expire_store, &dd->fifo_expire[WRITE], 0, INT_MAX, 1);
STORE_FUNCTION(deadline_writes_starved_store, &dd->writes_starved, INT_MIN, INT_MAX, 0);
STORE_FUNCTION(deadline_front_merges_store, &dd->front_merges, 0, 1, 0);
@@ -815,6 +820,7 @@ STORE_FUNCTION(deadline_fifo_batch_store
static struct elv_fs_entry deadline_attrs[] = {
DD_ATTR(read_expire),
+ DD_ATTR(reada_expire),
DD_ATTR(write_expire),
DD_ATTR(writes_starved),
DD_ATTR(front_merges),
--
next prev parent reply other threads:[~2006-06-24 2:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060624020358.719251923@localhost.localdomain>
2006-06-24 2:03 ` [PATCH 0/7] [RFC] iosched: make a difference between read/readahead requests Fengguang Wu
[not found] ` <20060624024257.216415573@localhost.localdomain>
2006-06-24 2:03 ` [PATCH 1/7] iosched: introduce WRITEA Fengguang Wu
[not found] ` <20060624024257.537043377@localhost.localdomain>
2006-06-24 2:04 ` Fengguang Wu [this message]
[not found] ` <20060624024258.540944943@localhost.localdomain>
2006-06-24 2:04 ` [PATCH 4/7] iosched: submit READA requests on possible readahead code path Fengguang Wu
[not found] ` <20060624024259.383733317@localhost.localdomain>
2006-06-24 2:04 ` [PATCH 6/7] iosched: run elv_kick_page() on sync read Fengguang Wu
[not found] ` <20060624024259.755490540@localhost.localdomain>
2006-06-24 2:04 ` [PATCH 7/7] iosched: introduce deadline_kick_page() Fengguang Wu
[not found] <20060625071036.241325936@localhost.localdomain>
[not found] ` <20060625071729.342442894@localhost.localdomain>
2006-06-25 7:10 ` [PATCH 2/7] iosched: introduce parameter deadline.reada_expire Fengguang Wu
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=351116971.08470@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=l.lunak@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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