From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org
Cc: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: [PATCH 04/15] cfq-iosched: Rename few functions related to selecting workload
Date: Mon, 1 Oct 2012 15:32:45 -0400 [thread overview]
Message-ID: <1349119976-26837-5-git-send-email-vgoyal@redhat.com> (raw)
In-Reply-To: <1349119976-26837-1-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
choose_st() 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
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 5eb3ed2..9657924 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2486,7 +2486,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;
@@ -2509,7 +2509,8 @@ static enum wl_type_t cfq_choose_wl(struct cfq_data *cfqd,
return cur_best;
}
-static void choose_st(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;
@@ -2547,7 +2548,7 @@ static void choose_st(struct cfq_data *cfqd, struct cfq_group *cfqg)
new_workload:
/* otherwise select new workload type */
- cfqd->wl_type = cfq_choose_wl(cfqd, cfqg, cfqd->wl_class);
+ cfqd->wl_type = cfq_choose_wl_type(cfqd, cfqg, cfqd->wl_class);
st = st_for(cfqg, cfqd->wl_class, cfqd->wl_type);
count = st->count;
@@ -2616,7 +2617,7 @@ static void cfq_choose_cfqg(struct cfq_data *cfqd)
} else
cfqd->workload_expires = jiffies - 1;
- choose_st(cfqd, cfqg);
+ choose_wl_class_and_type(cfqd, cfqg);
}
/*
--
1.7.7.6
next prev parent reply other threads:[~2012-10-01 19:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-01 19:32 [RFC PATCH 00/15] Use vdisktime based scheduling logic for cfq queues Vivek Goyal
2012-10-01 19:32 ` [PATCH 01/15] cfq-iosched: Properly name all references to IO class Vivek Goyal
[not found] ` <1349119976-26837-2-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-01 20:51 ` Jeff Moyer
2012-10-03 0:54 ` Tejun Heo
2012-10-03 13:06 ` Vivek Goyal
[not found] ` <1349119976-26837-1-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-01 19:32 ` [PATCH 02/15] cfq-iosched: More renaming to better represent wl_class and wl_type Vivek Goyal
2012-10-01 20:50 ` Jeff Moyer
2012-10-02 13:25 ` Vivek Goyal
2012-10-01 19:32 ` [PATCH 03/15] cfq-iosched: Rename "service_tree" to "st" Vivek Goyal
[not found] ` <1349119976-26837-4-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-01 20:52 ` Jeff Moyer
[not found] ` <x49ipatj4oy.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2012-10-02 13:26 ` Vivek Goyal
[not found] ` <20121002132603.GB758-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-03 0:59 ` Tejun Heo
2012-10-01 19:32 ` Vivek Goyal [this message]
[not found] ` <1349119976-26837-5-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-01 20:55 ` [PATCH 04/15] cfq-iosched: Rename few functions related to selecting workload Jeff Moyer
2012-10-01 19:32 ` [PATCH 05/15] cfq-iosched: Get rid of unnecessary local variable Vivek Goyal
[not found] ` <1349119976-26837-6-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-01 20:57 ` Jeff Moyer
2012-10-01 19:32 ` [PATCH 06/15] cfq-iosched: Print sync-noidle information in blktrace messages Vivek Goyal
[not found] ` <1349119976-26837-7-git-send-email-vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-01 21:01 ` Jeff Moyer
2012-10-01 19:32 ` [PATCH 07/15] cfq-iosced: Do the round robin selection of workload type Vivek Goyal
2012-10-01 19:32 ` [PATCH 08/15] cfq-iosched: Make cfq_scale_slice() usable for both queues and groups Vivek Goyal
2012-10-01 19:32 ` [PATCH 09/15] cfq-iosched: make new_cfqq variable bool Vivek Goyal
2012-10-01 19:32 ` [PATCH 11/15] cfq-iosched: Remove residual slice logic Vivek Goyal
2012-10-01 19:32 ` [PATCH 12/15] cfq-iosched: put cooperating queue at the front of service tree Vivek Goyal
2012-10-01 19:32 ` [PATCH 14/15] cfq-iosched: Wait for queue to get busy even if this is not last queue in group Vivek Goyal
2012-10-01 19:32 ` [PATCH 15/15] cfq-ioschd: Give boost to higher prio/weight queues Vivek Goyal
2012-10-01 19:32 ` [PATCH 10/15] cfq-get-rid-of-slice-offset-and-always-put-new-queue-at-the-end-2 Vivek Goyal
2012-10-01 19:32 ` [PATCH 13/15] cfq-iosched: Use same scheduling algorithm for groups and queues Vivek Goyal
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=1349119976-26837-5-git-send-email-vgoyal@redhat.com \
--to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).