[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080701135409.5e68ccd8.pj@sgi.com>
Date: Tue, 1 Jul 2008 13:54:09 -0500
From: Paul Jackson <pj@....com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: dhaval@...ux.vnet.ibm.com, menage@...gle.com,
akpm@...ux-foundation.org, balbir@...ibm.com,
skumar@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
containers@...ts.osdl.org
Subject: Re: Attaching PID 0 to a cgroup
> But it's better to document this.
Good idea.
Acked-by: Paul Jackson <pj@....com>
You (Li Zefan) might want to resend this as a patch, in case Andrew
doesn't happen to see this embedded here.
Something like the following:
Subject: [PATCH] cgroup: document zero pid means current task
From: Li Zefan <lizf@...fujitsu.com>
Document that a pid of zero(0) can be used to refer to the
current task when attaching a task to a cgroup, as in the
following usage:
# echo 0 > /dev/cgroup/tasks
This is consistent with existing cpuset behavior.
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Acked-by: Dhaval Giani <dhaval@...ux.vnet.ibm.com>
Acked-by: Paul Jackson <pj@....com>
---
cgroups.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/cgroups.txt b/Documentation/cgroups.txt
index 824fc02..213f533 100644
--- a/Documentation/cgroups.txt
+++ b/Documentation/cgroups.txt
@@ -390,6 +390,10 @@ If you have several tasks to attach, you have to do it one after another:
...
# /bin/echo PIDn > tasks
+You can attach the current task by echoing 0:
+
+# /bin/echo 0 > tasks
+
3. Kernel API
=============
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@....com> 1.940.382.4214
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists