Re: [RFC][patch 8/11][CFQ-cgroup] Control cfq_data per cgroup

From: Paul Menage
Date: Thu Apr 03 2008 - 11:35:26 EST


On Tue, Apr 1, 2008 at 2:38 AM, Satoshi UCHIDA <s-uchida@xxxxxxxxxxxxx> wrote:
> +
> +static void *cfq_cgroup_init_cfq_data(struct cfq_cgroup *cfqc, struct cfq_data *cfqd)
> +{
> + struct cgroup *child;
> +
> + /* setting cfq_data for cfq_cgroup */
> + if (!cfqc) {
> + cfqc = cgroup_to_cfq_cgroup(get_root_subsys(&cfq_cgroup_subsys));

Rather than adding get_root_subsys(), can't you just keep a reference
locally to your root subsystem state?

Paul
--
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/