Thread (57 messages) 57 messages, 4 authors, 2012-12-14

Re: [patch v2 2/6] memcg: keep prev's css alive for the whole mem_cgroup_iter

From: Kamezawa Hiroyuki <hidden>
Date: 2012-11-28 08:39:13
Also in: lkml

(2012/11/27 3:47), Michal Hocko wrote:
css reference counting keeps the cgroup alive even though it has been
already removed. mem_cgroup_iter relies on this fact and takes a
reference to the returned group. The reference is then released on the
next iteration or mem_cgroup_iter_break.
mem_cgroup_iter currently releases the reference right after it gets the
last css_id.
This is correct because neither prev's memcg nor cgroup are accessed
after then. This will change in the next patch so we need to hold the
group alive a bit longer so let's move the css_put at the end of the
function.

Signed-off-by: Michal Hocko <redacted>
Acked-by: KAMEZAWA Hiroyuki <redacted>


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help