lkml.org 
[lkml]   [2012]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/15] cfq-iosched: Properly name all references to IO class
On Mon, Oct 01, 2012 at 03:32:42PM -0400, Vivek Goyal wrote:
> Currently CFQ has three IO classes, RT, BE and IDLE. At many a places we
> are calling workloads belonging to these classes as "prio". This gets
> very confusing as one starts to associate it with ioprio.
>
> So this patch just does bunch of renaming so that reading code becomes
> easier. All reference to RT, BE and IDLE workload are done using keyword
> "class" and all references to subclass, SYNC, SYNC-IDLE, ASYNC are made
> using keyword "type".
>
> This makes me feel much better while I am reading the code. There is no
> functionality change due to this patch.
>
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>

Acked-by: Tejun Heo <tj@kernel.org>

> @@ -751,16 +751,16 @@ static enum wl_type_t cfqq_type(struct cfq_queue *cfqq)
> return SYNC_WORKLOAD;
> }
>
> -static inline int cfq_group_busy_queues_wl(enum wl_prio_t wl,
> +static inline int cfq_group_busy_queues_wl(enum wl_class_t wl_class,
> struct cfq_data *cfqd,
> struct cfq_group *cfqg)
> {
> - if (wl == IDLE_WORKLOAD)
> + if (wl_class == IDLE_WORKLOAD)
> return cfqg->service_tree_idle.count;
>
> - return cfqg->service_trees[wl][ASYNC_WORKLOAD].count
> - + cfqg->service_trees[wl][SYNC_NOIDLE_WORKLOAD].count
> - + cfqg->service_trees[wl][SYNC_WORKLOAD].count;
> + return cfqg->service_trees[wl_class][ASYNC_WORKLOAD].count
> + + cfqg->service_trees[wl_class][SYNC_NOIDLE_WORKLOAD].count
> + + cfqg->service_trees[wl_class][SYNC_WORKLOAD].count;

While at it, maybe move the operator to the end of the preceding line
like everybody else?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2012-10-03 03:41    [W:0.146 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site