mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: linux-kernel@vger.kernel.org, axboe@kernel.dk
Cc: vgoyal@redhat.com, jmoyer@redhat.com, tj@kernel.org
Subject: [PATCH 4/6] cfq-iosched: Rename few functions related to selecting workload
Date: Wed,  3 Oct 2012 16:56:59 -0400	[thread overview]
Message-ID: <1349297821-30078-5-git-send-email-vgoyal@redhat.com> (raw)
In-Reply-To: <1349297821-30078-1-git-send-email-vgoyal@redhat.com>

choose_service_tree() selects/sets both wl_class and wl_type.  Rename it to
choose_wl_class_and_type() to make it very clear.

cfq_choose_wl() only selects and sets wl_type. It is easy to confuse
it with choose_st(). So rename it to cfq_choose_wl_type() to make
it clear what does it do.

Just renaming. No functionality change.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
---
 block/cfq-iosched.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 1d45eea..6e6e00f 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2489,7 +2489,7 @@ static void cfq_setup_merge(struct cfq_queue *cfqq, struct cfq_queue *new_cfqq)
 	}
 }
 
-static enum wl_type_t cfq_choose_wl(struct cfq_data *cfqd,
+static enum wl_type_t cfq_choose_wl_type(struct cfq_data *cfqd,
 			struct cfq_group *cfqg, enum wl_class_t wl_class)
 {
 	struct cfq_queue *queue;
@@ -2512,7 +2512,8 @@ static enum wl_type_t cfq_choose_wl(struct cfq_data *cfqd,
 	return cur_best;
 }
 
-static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
+static void
+choose_wl_class_and_type(struct cfq_data *cfqd, struct cfq_group *cfqg)
 {
 	unsigned slice;
 	unsigned count;
@@ -2550,7 +2551,7 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
 
 new_workload:
 	/* otherwise select new workload type */
-	cfqd->serving_wl_type = cfq_choose_wl(cfqd, cfqg,
+	cfqd->serving_wl_type = cfq_choose_wl_type(cfqd, cfqg,
 					cfqd->serving_wl_class);
 	st = st_for(cfqg, cfqd->serving_wl_class, cfqd->serving_wl_type);
 	count = st->count;
@@ -2620,7 +2621,7 @@ static void cfq_choose_cfqg(struct cfq_data *cfqd)
 	} else
 		cfqd->workload_expires = jiffies - 1;
 
-	choose_service_tree(cfqd, cfqg);
+	choose_wl_class_and_type(cfqd, cfqg);
 }
 
 /*
-- 
1.7.7.6


  parent reply	other threads:[~2012-10-03 20:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-03 20:56 [PATCH 0/6] cfq-iosched: Some minor cleanups Vivek Goyal
2012-10-03 20:56 ` [PATCH 1/6] cfq-iosched: Properly name all references to IO class Vivek Goyal
2012-10-03 20:56 ` [PATCH 2/6] cfq-iosched: More renaming to better represent wl_class and wl_type Vivek Goyal
2012-12-06 19:17   ` Tejun Heo
2012-10-03 20:56 ` [PATCH 3/6] cfq-iosched: Rename "service_tree" to "st" at some places Vivek Goyal
2012-12-06 19:18   ` Tejun Heo
2012-10-03 20:56 ` Vivek Goyal [this message]
2012-12-06 19:19   ` [PATCH 4/6] cfq-iosched: Rename few functions related to selecting workload Tejun Heo
2012-10-03 20:57 ` [PATCH 5/6] cfq-iosched: Get rid of unnecessary local variable Vivek Goyal
2012-12-06 19:20   ` Tejun Heo
2012-10-03 20:57 ` [PATCH 6/6] cfq-iosched: Print sync-noidle information in blktrace messages Vivek Goyal
2012-12-06 19:21   ` Tejun Heo
2012-12-06 19:23 ` [PATCH 0/6] cfq-iosched: Some minor cleanups Tejun Heo

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=1349297821-30078-5-git-send-email-vgoyal@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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

all inboxes | Powered by JetHome®