| From | Jeff Moyer <> | Subject | Re: [PATCH 08/20] blkio: Add support for dynamic creation of cfq_groups | Date | Wed, 04 Nov 2009 11:01:51 -0500 |
| |
Vivek Goyal <vgoyal@redhat.com> writes:
> + /* Do we need to take this reference */ > + if (!css_tryget(&blkcg->css)) > + return NULL;;
Interesting question. It seems like, so long as you want to reference that cgroup, you need a reference on it. ->alloc will only give you one, so as long as we have pointers to these squirreled away, we need to bump the reference count. Please take a look at this before your next posting.
> + > + cfqg = cfqg_of_blkg(blkiocg_lookup_group(blkcg, key)); > + if (cfqg || !create) > + goto done; > + > + cfqg = kzalloc_node(sizeof(*cfqg), GFP_ATOMIC | __GFP_ZERO, > + cfqd->queue->node); Do you really have to OR in __GFP_ZERO for kzalloc?
> + cfqg = cfq_find_alloc_cfqg(cfqd, cgroup, create); > + if (!cfqg && create) > + cfqg = &cfqd->root_group;
Hmm, is that really the behaviour you want?
Cheers, Jeff
|