[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Re: [PATCH 09/25] io-controller: Common hierarchical fair queuing code in elevaotor layer
- From: Vivek Goyal <vgoyal redhat com>
- To: Gui Jianfeng <guijianfeng cn fujitsu com>
- Cc: dhaval linux vnet ibm com, snitzer redhat com, peterz infradead org, dm-devel redhat com, dpshah google com, jens axboe oracle com, agk redhat com, balbir linux vnet ibm com, paolo valente unimore it, fernando oss ntt co jp, mikew google com, jmoyer redhat com, nauman google com, m-ikeda ds jp nec com, lizf cn fujitsu com, fchecconi gmail com, akpm linux-foundation org, jbaron redhat com, linux-kernel vger kernel org, s-uchida ap jp nec com, righi andrea gmail com, containers lists linux-foundation org
- Subject: [dm-devel] Re: [PATCH 09/25] io-controller: Common hierarchical fair queuing code in elevaotor layer
- Date: Mon, 6 Jul 2009 10:16:50 -0400
On Mon, Jul 06, 2009 at 10:46:19AM +0800, Gui Jianfeng wrote:
> Vivek Goyal wrote:
> ...
> > +static struct io_group *
> > +io_group_chain_alloc(struct request_queue *q, void *key, struct cgroup *cgroup)
> > +{
> > + struct io_cgroup *iocg;
> > + struct io_group *iog, *leaf = NULL, *prev = NULL;
> > + gfp_t flags = GFP_ATOMIC | __GFP_ZERO;
> > +
> > + for (; cgroup != NULL; cgroup = cgroup->parent) {
> > + iocg = cgroup_to_io_cgroup(cgroup);
> > +
> > + iog = io_cgroup_lookup_group(iocg, key);
> > + if (iog != NULL) {
> > + /*
> > + * All the cgroups in the path from there to the
> > + * root must have a io_group for efqd, so we don't
> > + * need any more allocations.
> > + */
> > + break;
> > + }
> > +
> > + iog = kzalloc_node(sizeof(*iog), flags, q->node);
> > + if (!iog)
> > + goto cleanup;
> > +
> > + iog->iocg_id = css_id(&iocg->css);
>
> Hi Vivek,
>
> IMHO, The io_cgroup id is nothing more than keeping track the corresponding iocg.
> So why not just store iocg pointer in io_group and just get rid of this complexity.
> I'd like to post a patch to do this change, what's your opinion?
>
Hi Gui,
You can try that but I suspect that there not much to be gained in
terms of number of lines of code or code complexity. Do try it out though
and we can then have a look at the patch.
Thanks
Vivek
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]