lkml.org 
[lkml]   [2009]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 08/20] blkio: Add support for dynamic creation of cfq_groups
Date
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


\
 
 \ /
  Last update: 2009-11-04 17:05    [W:0.481 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site