<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/kernel/cgroup_freezer.c, branch v2.6.32</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.kobert.dev/pm24.git/atom/kernel/cgroup_freezer.c?h=v2.6.32</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom/kernel/cgroup_freezer.c?h=v2.6.32'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2009-09-24T14:20:58Z</updated>
<entry>
<title>cgroups: let ss-&gt;can_attach and ss-&gt;attach do whole threadgroups at a time</title>
<updated>2009-09-24T14:20:58Z</updated>
<author>
<name>Ben Blum</name>
<email>bblum@google.com</email>
</author>
<published>2009-09-23T22:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=be367d09927023d081f9199665c8500f69f14d22'/>
<id>urn:sha1:be367d09927023d081f9199665c8500f69f14d22</id>
<content type='text'>
Alter the ss-&gt;can_attach and ss-&gt;attach functions to be able to deal with
a whole threadgroup at a time, for use in cgroup_attach_proc.  (This is a
pre-patch to cgroup-procs-writable.patch.)

Currently, new mode of the attach function can only tell the subsystem
about the old cgroup of the threadgroup leader.  No subsystem currently
needs that information for each thread that's being moved, but if one were
to be added (for example, one that counts tasks within a group) this bit
would need to be reworked a bit to tell the subsystem the right
information.

[hidave.darkstar@gmail.com: fix build]
Signed-off-by: Ben Blum &lt;bblum@google.com&gt;
Signed-off-by: Paul Menage &lt;menage@google.com&gt;
Acked-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Reviewed-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer_cg: disable writing freezer.state of root cgroup</title>
<updated>2008-11-13T01:17:16Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-11-12T21:26:50Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=3b1b3f6e57064aa8f91c290fe51cda4c74642902'/>
<id>urn:sha1:3b1b3f6e57064aa8f91c290fe51cda4c74642902</id>
<content type='text'>
With this change, control file 'freezer.state' doesn't exist in root
cgroup, making root cgroup unfreezable.

I think it's reasonable to disallow freeze tasks in the root cgroup.  And
then we can avoid fork overhead when freezer subsystem is compiled but not
used.

Also make writing invalid value to freezer.state returns EINVAL rather
than EIO.  This is more consistent with other cgroup subsystem.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Paul Menage &lt;menage@google.com&gt;
Cc: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Cc: "Serge E. Hallyn" &lt;serue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer_cg: remove task_lock from freezer_fork()</title>
<updated>2008-11-13T01:17:16Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-11-12T21:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=687446760bd008df96655cb8c5900f8e48a7118c'/>
<id>urn:sha1:687446760bd008df96655cb8c5900f8e48a7118c</id>
<content type='text'>
In theory the task can be moved to another cgroup and the freezer will be
freed right after task_lock is dropped, so the lock results in zero
protection.

But in the case of freezer_fork() no lock is needed, since the task is not
in tasklist yet so it won't be moved to another cgroup, so task-&gt;cgroups
won't be changed or invalidated.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Cc: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: "Serge E. Hallyn" &lt;serue@us.ibm.com&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer_cg: simplify freezer_change_state()</title>
<updated>2008-10-30T18:38:45Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-10-29T21:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=51308ee59dee1136ed599d875ea8968d7be55c91'/>
<id>urn:sha1:51308ee59dee1136ed599d875ea8968d7be55c91</id>
<content type='text'>
Just call unfreeze_cgroup() if goal_state == THAWED, and call
try_to_freeze_cgroup() if goal_state == FROZEN.

No behavior has been changed.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Acked-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer_cg: use thaw_process() in unfreeze_cgroup()</title>
<updated>2008-10-30T18:38:45Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-10-29T21:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=00c2e63c31d0f431952ff2a671c5c6997dd4f8b2'/>
<id>urn:sha1:00c2e63c31d0f431952ff2a671c5c6997dd4f8b2</id>
<content type='text'>
Don't duplicate the implementation of thaw_process().

[akpm@linux-foundation.org: make __thaw_process() static]
Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Acked-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer_cg: remove redundant check in freezer_can_attach()</title>
<updated>2008-10-30T18:38:45Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-10-29T21:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=80a6a2cf3bebcf20285cf05373b9c5ec96816577'/>
<id>urn:sha1:80a6a2cf3bebcf20285cf05373b9c5ec96816577</id>
<content type='text'>
It is sufficient to check if @task is frozen, and no need to check if the
original freezer is frozen.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Acked-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer_cg: fix improper BUG_ON() causing oops</title>
<updated>2008-10-30T18:38:45Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-10-29T21:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7ccb97437bcc818d0ba6067513475f6ee8177a15'/>
<id>urn:sha1:7ccb97437bcc818d0ba6067513475f6ee8177a15</id>
<content type='text'>
The BUG_ON() should be protected by freezer-&gt;lock, otherwise it can be
triggered easily when a task has been unfreezed but the corresponding
cgroup hasn't been changed to FROZEN state.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Acked-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>container freezer: rename check_if_frozen()</title>
<updated>2008-10-20T15:52:34Z</updated>
<author>
<name>Matt Helsley</name>
<email>matthltc@us.ibm.com</email>
</author>
<published>2008-10-19T03:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1aece34833721d64eb33fc15cd923c727296d3d3'/>
<id>urn:sha1:1aece34833721d64eb33fc15cd923c727296d3d3</id>
<content type='text'>
check_if_frozen() sounds like it should return something when in fact it's
just updating the freezer state.

Signed-off-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>container freezer: make freezer state names less generic</title>
<updated>2008-10-20T15:52:34Z</updated>
<author>
<name>Matt Helsley</name>
<email>matthltc@us.ibm.com</email>
</author>
<published>2008-10-19T03:27:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=81dcf33c2ae314899f754aa7aaa1cb1fe2f84da6'/>
<id>urn:sha1:81dcf33c2ae314899f754aa7aaa1cb1fe2f84da6</id>
<content type='text'>
Rename cgroup freezer states to be less generic to avoid any name
collisions while also better describing what each state is.

Signed-off-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>container freezer: prevent frozen tasks or cgroups from changing</title>
<updated>2008-10-20T15:52:34Z</updated>
<author>
<name>Matt Helsley</name>
<email>matthltc@us.ibm.com</email>
</author>
<published>2008-10-19T03:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=957a4eeaf4af614ab0fc4c09a22593d6ab233f5b'/>
<id>urn:sha1:957a4eeaf4af614ab0fc4c09a22593d6ab233f5b</id>
<content type='text'>
Don't let frozen tasks or cgroups change.  This means frozen tasks can't
leave their current cgroup for another cgroup.  It also means that tasks
cannot be added to or removed from a cgroup in the FROZEN state.  We
enforce these rules by checking for frozen tasks and cgroups in the
can_attach() function.

Signed-off-by: Matt Helsley &lt;matthltc@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
