[PATCH 0/3] Fix the 'current css_set' problem in debug subsystem

From: Liu Aleaxander
Date: Mon Nov 02 2009 - 02:44:27 EST

Hello all.

(Sorry for the resending, it seems I opened the HTML encoding before)

This a three-patch set to fix the 'current css_set' problem in debug
subsystem of cgroup system. (well, in fact, it's a two-patch set; the
third one just fixes a typo).

Say I mount a cgroup fs in /cgroup, and here is the problem:
$ cat debug.current_css_set_refcount
$ mkdir test
$ cd test
$ cat debug.curernt_css_set_refcount

$ echo $$ > tasks
$ cat debug.current_css_set_refcount
$ cd ../
$ cat debug.current_css_set_refcount

That means it always print the css_set_refcount of the cgroup that
comprise the current task(bash, here), instead of the current cgroup
whatever cgroup you are in. And this would be meaningless to put the
same content in all the cgroups. So, to make it more meaningful, we
should make it print the css_set_refcount of the cgroup you are
currently in.

Patch 1 adds a cgroup_first_css_set function to get the current
css_set of one cgroup.
Patch 2 fixes the problem.
Patch 3 just fixes a typo.

Liu Aleaxander
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/