From: Corrado Zoccolo <czoccolo@gmail.com>
To: "Linux-Kernel" <linux-kernel@vger.kernel.org>,
Jens Axboe <jens.axboe@oracle.com>,
Jeff Moyer <jmoyer@redhat.com>, Vivek Goyal <vgoyal@redhat.com>
Subject: [PATCH] cfq-iosched: cleanup unreachable code
Date: Tue, 24 Nov 2009 17:01:49 +0100 [thread overview]
Message-ID: <200911241701.49677.czoccolo@gmail.com> (raw)
cfq_should_idle returns false for no-idle queues that are not the last,
so the control flow will never reach the removed code in a state that
satisfies the if condition.
The unreachable code was added to emulate previous cfq behaviour for
non-NCQ rotational devices. My tests show that even without it, the
performances and fairness are comparable with previous cfq, thanks to
the fact that all seeky queues are grouped together, and that we idle at
the end of the tree.
Signed-off-by: Corrado Zoccolo <czoccolo@gmail.com>
---
block/cfq-iosched.c | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d44f8a4..7144649 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1274,19 +1274,6 @@ static void cfq_arm_slice_timer(struct cfq_data *cfqd)
cfq_mark_cfqq_wait_request(cfqq);
sl = cfqd->cfq_slice_idle;
- /* are we servicing noidle tree, and there are more queues?
- * non-rotational or NCQ: no idle
- * non-NCQ rotational : very small idle, to allow
- * fair distribution of slice time for a process doing back-to-back
- * seeks.
- */
- if (cfqd->serving_type == SYNC_NOIDLE_WORKLOAD &&
- service_tree_for(cfqd->serving_prio, SYNC_NOIDLE_WORKLOAD, cfqd)
- ->count > 0) {
- if (blk_queue_nonrot(cfqd->queue) || cfqd->hw_tag)
- return;
- sl = min(sl, msecs_to_jiffies(CFQ_MIN_TT));
- }
mod_timer(&cfqd->idle_slice_timer, jiffies + sl);
cfq_log_cfqq(cfqd, cfqq, "arm_idle: %lu", sl);
--
1.6.2.5
next reply other threads:[~2009-11-24 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-24 16:01 Corrado Zoccolo [this message]
2009-11-24 19:36 ` [PATCH] cfq-iosched: cleanup unreachable code Vivek Goyal
2009-11-26 8:42 ` 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=200911241701.49677.czoccolo@gmail.com \
--to=czoccolo@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.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;
as well as URLs for NNTP newsgroup(s).