Re: [PATCH 11/24] cfq-iosched: add leaf_weight

From: Vivek Goyal
Date: Tue Jan 08 2013 - 10:34:42 EST


On Fri, Dec 28, 2012 at 12:35:33PM -0800, Tejun Heo wrote:

[..]
> +
> + /* on root, leaf_weight is mapped to weight */
> + {
> + .name = "leaf_weight_device",
> + .flags = CFTYPE_ONLY_ON_ROOT,
> + .read_seq_string = cfqg_print_weight_device,
> + .write_string = cfqg_set_weight_device,
> + .max_write_len = 256,
> + },
> + {
> + .name = "leaf_weight",
> + .flags = CFTYPE_ONLY_ON_ROOT,
> + .read_seq_string = cfq_print_weight,
> + .write_u64 = cfq_set_weight,
> + },

Hi Tejun,

How does it help to map leaf weight to weight in root group. Old programs
anyway don't know about leaf_weight. So nobody is going to update it. And
if they update it, they better know what does it do.

I think we just need to map "weight" to "leaf_weight" once you switch to
making use of leaf_weight and at that point of time a user will expect
that updating weight retains the old behavior. I think you have done
that in later patch.

But mapping leaf_weight to weight seems unnecessary atleast from backward
compatibility point of view.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/