lkml.org 
[lkml]   [2009]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 09/25] io-controller: Common hierarchical fair queuing code in elevaotor layer
    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?

    --
    Regards
    Gui Jianfeng



    \
     
     \ /
      Last update: 2009-07-06 04:49    [W:0.021 / U:89.468 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site