All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
@ 2011-03-09 21:09 Eric B Munson
       [not found] ` <1299704969-4485-1-git-send-email-emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Eric B Munson @ 2011-03-09 21:09 UTC (permalink / raw)
  To: containers; +Cc: rdunlap, linux-doc, linux-kernel, Eric B Munson

The cgroup documentation does not specify how a process can be removed from a
particular group.  This patch adds a note at the end of the simple example
about how this is done.  Also, some cgroups (like cpusets) require user input
before a new group can be used.  This is noted in the patch as well.

Signed-off-by: Eric B Munson <emunson@mgebm.net>
---
 Documentation/cgroups/cgroups.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 44b8b7a..6c975a1 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
 The "xxx" is not interpreted by the cgroup code, but will appear in
 /proc/mounts so may be any useful identifying string that you like.
 
+Note: Some subsystems do not work without some user input first.  For instance,
+if cpusets are enabled the user will have to populate the cpus and mems files
+for each new cgroup created before that group can be used.
+
 To mount a cgroup hierarchy with just the cpuset and memory
 subsystems, type:
 # mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
@@ -426,6 +430,9 @@ You can attach the current shell task by echoing 0:
 
 # echo 0 > tasks
 
+Note: To remove a task from a cgroup you must write its PID to the root
+tasks file.
+
 2.3 Mounting hierarchies by name
 --------------------------------
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
@ 2011-03-09 21:09 Eric B Munson
  0 siblings, 0 replies; 10+ messages in thread
From: Eric B Munson @ 2011-03-09 21:09 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: Eric B Munson, rdunlap-/UHa2rfvQTnk1uMJSBkQmQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA

The cgroup documentation does not specify how a process can be removed from a
particular group.  This patch adds a note at the end of the simple example
about how this is done.  Also, some cgroups (like cpusets) require user input
before a new group can be used.  This is noted in the patch as well.

Signed-off-by: Eric B Munson <emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
---
 Documentation/cgroups/cgroups.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 44b8b7a..6c975a1 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
 The "xxx" is not interpreted by the cgroup code, but will appear in
 /proc/mounts so may be any useful identifying string that you like.
 
+Note: Some subsystems do not work without some user input first.  For instance,
+if cpusets are enabled the user will have to populate the cpus and mems files
+for each new cgroup created before that group can be used.
+
 To mount a cgroup hierarchy with just the cpuset and memory
 subsystems, type:
 # mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
@@ -426,6 +430,9 @@ You can attach the current shell task by echoing 0:
 
 # echo 0 > tasks
 
+Note: To remove a task from a cgroup you must write its PID to the root
+tasks file.
+
 2.3 Mounting hierarchies by name
 --------------------------------
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
       [not found] ` <1299704969-4485-1-git-send-email-emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
@ 2011-03-09 23:07   ` Kirill A. Shutemov
  2011-03-09 23:13   ` Paul Menage
  1 sibling, 0 replies; 10+ messages in thread
From: Kirill A. Shutemov @ 2011-03-09 23:07 UTC (permalink / raw)
  To: Eric B Munson
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, rdunlap-/UHa2rfvQTnk1uMJSBkQmQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Wed, Mar 09, 2011 at 04:09:29PM -0500, Eric B Munson wrote:
> The cgroup documentation does not specify how a process can be removed from a
> particular group.  This patch adds a note at the end of the simple example
> about how this is done.  Also, some cgroups (like cpusets) require user input
> before a new group can be used.  This is noted in the patch as well.
> 
> Signed-off-by: Eric B Munson <emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
> ---
>  Documentation/cgroups/cgroups.txt |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
> index 44b8b7a..6c975a1 100644
> --- a/Documentation/cgroups/cgroups.txt
> +++ b/Documentation/cgroups/cgroups.txt
> @@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
>  The "xxx" is not interpreted by the cgroup code, but will appear in
>  /proc/mounts so may be any useful identifying string that you like.
>  
> +Note: Some subsystems do not work without some user input first.  For instance,
> +if cpusets are enabled the user will have to populate the cpus and mems files
> +for each new cgroup created before that group can be used.
> +
>  To mount a cgroup hierarchy with just the cpuset and memory
>  subsystems, type:
>  # mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
> @@ -426,6 +430,9 @@ You can attach the current shell task by echoing 0:
>  
>  # echo 0 > tasks
>  
> +Note: To remove a task from a cgroup you must write its PID to the root
> +tasks file.
> +

'to tasks file of another cgroup.'?

>  2.3 Mounting hierarchies by name
>  --------------------------------
>  
> -- 
> 1.7.1
> 
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
  2011-03-09 21:09 [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup Eric B Munson
       [not found] ` <1299704969-4485-1-git-send-email-emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
@ 2011-03-09 23:07 ` Kirill A. Shutemov
  2011-03-09 23:13 ` Paul Menage
  2 siblings, 0 replies; 10+ messages in thread
From: Kirill A. Shutemov @ 2011-03-09 23:07 UTC (permalink / raw)
  To: Eric B Munson; +Cc: containers, rdunlap, linux-kernel, linux-doc

On Wed, Mar 09, 2011 at 04:09:29PM -0500, Eric B Munson wrote:
> The cgroup documentation does not specify how a process can be removed from a
> particular group.  This patch adds a note at the end of the simple example
> about how this is done.  Also, some cgroups (like cpusets) require user input
> before a new group can be used.  This is noted in the patch as well.
> 
> Signed-off-by: Eric B Munson <emunson@mgebm.net>
> ---
>  Documentation/cgroups/cgroups.txt |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
> index 44b8b7a..6c975a1 100644
> --- a/Documentation/cgroups/cgroups.txt
> +++ b/Documentation/cgroups/cgroups.txt
> @@ -349,6 +349,10 @@ To mount a cgroup hierarchy with all available subsystems, type:
>  The "xxx" is not interpreted by the cgroup code, but will appear in
>  /proc/mounts so may be any useful identifying string that you like.
>  
> +Note: Some subsystems do not work without some user input first.  For instance,
> +if cpusets are enabled the user will have to populate the cpus and mems files
> +for each new cgroup created before that group can be used.
> +
>  To mount a cgroup hierarchy with just the cpuset and memory
>  subsystems, type:
>  # mount -t cgroup -o cpuset,memory hier1 /dev/cgroup
> @@ -426,6 +430,9 @@ You can attach the current shell task by echoing 0:
>  
>  # echo 0 > tasks
>  
> +Note: To remove a task from a cgroup you must write its PID to the root
> +tasks file.
> +

'to tasks file of another cgroup.'?

>  2.3 Mounting hierarchies by name
>  --------------------------------
>  
> -- 
> 1.7.1
> 
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers

-- 
 Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
       [not found] ` <1299704969-4485-1-git-send-email-emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
  2011-03-09 23:07   ` Kirill A. Shutemov
@ 2011-03-09 23:13   ` Paul Menage
  1 sibling, 0 replies; 10+ messages in thread
From: Paul Menage @ 2011-03-09 23:13 UTC (permalink / raw)
  To: Eric B Munson
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA

On Wed, Mar 9, 2011 at 1:09 PM, Eric B Munson <emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org> wrote:
>
> +Note: To remove a task from a cgroup you must write its PID to the root
> +tasks file.
> +

This isn't really accurate - the root cgroup is a cgroup like all the
others. More accurate would be something like:

Since every task is always a member of exactly one cgroup in each
mounted hierarchy, to remove a task from its current cgroup you must
move it into a new cgroup (possibly the root cgroup) by writing to the
new cgroup's tasks file.

Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
  2011-03-09 21:09 [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup Eric B Munson
       [not found] ` <1299704969-4485-1-git-send-email-emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
  2011-03-09 23:07 ` Kirill A. Shutemov
@ 2011-03-09 23:13 ` Paul Menage
  2011-03-10 14:44   ` Mike Heffner
                     ` (3 more replies)
  2 siblings, 4 replies; 10+ messages in thread
From: Paul Menage @ 2011-03-09 23:13 UTC (permalink / raw)
  To: Eric B Munson; +Cc: containers, rdunlap, linux-doc, linux-kernel

On Wed, Mar 9, 2011 at 1:09 PM, Eric B Munson <emunson@mgebm.net> wrote:
>
> +Note: To remove a task from a cgroup you must write its PID to the root
> +tasks file.
> +

This isn't really accurate - the root cgroup is a cgroup like all the
others. More accurate would be something like:

Since every task is always a member of exactly one cgroup in each
mounted hierarchy, to remove a task from its current cgroup you must
move it into a new cgroup (possibly the root cgroup) by writing to the
new cgroup's tasks file.

Paul

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
  2011-03-09 23:13 ` Paul Menage
@ 2011-03-10 14:44   ` Mike Heffner
  2011-03-10 14:44   ` Mike Heffner
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Mike Heffner @ 2011-03-10 14:44 UTC (permalink / raw)
  To: Paul Menage
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA,
	Eric B Munson, linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 03/09/2011 06:13 PM, Paul Menage wrote:
> On Wed, Mar 9, 2011 at 1:09 PM, Eric B Munson<emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>  wrote:
>>
>> +Note: To remove a task from a cgroup you must write its PID to the root
>> +tasks file.
>> +
>
> This isn't really accurate - the root cgroup is a cgroup like all the
> others. More accurate would be something like:
>
> Since every task is always a member of exactly one cgroup in each
> mounted hierarchy, to remove a task from its current cgroup you must
> move it into a new cgroup (possibly the root cgroup) by writing to the
> new cgroup's tasks file.


If we are updating this documentation, can we include a blurb that 
mentions if the 'ns' cgroup is mounted in the hierarchy, moving a 
process to a new cgroup can fail?


Mike

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
  2011-03-09 23:13 ` Paul Menage
  2011-03-10 14:44   ` Mike Heffner
@ 2011-03-10 14:44   ` Mike Heffner
  2011-03-10 16:59   ` Eric B Munson
  2011-03-10 16:59   ` Eric B Munson
  3 siblings, 0 replies; 10+ messages in thread
From: Mike Heffner @ 2011-03-10 14:44 UTC (permalink / raw)
  To: Paul Menage; +Cc: Eric B Munson, linux-kernel, containers, rdunlap, linux-doc

On 03/09/2011 06:13 PM, Paul Menage wrote:
> On Wed, Mar 9, 2011 at 1:09 PM, Eric B Munson<emunson@mgebm.net>  wrote:
>>
>> +Note: To remove a task from a cgroup you must write its PID to the root
>> +tasks file.
>> +
>
> This isn't really accurate - the root cgroup is a cgroup like all the
> others. More accurate would be something like:
>
> Since every task is always a member of exactly one cgroup in each
> mounted hierarchy, to remove a task from its current cgroup you must
> move it into a new cgroup (possibly the root cgroup) by writing to the
> new cgroup's tasks file.


If we are updating this documentation, can we include a blurb that 
mentions if the 'ns' cgroup is mounted in the hierarchy, moving a 
process to a new cgroup can fail?


Mike


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
  2011-03-09 23:13 ` Paul Menage
                     ` (2 preceding siblings ...)
  2011-03-10 16:59   ` Eric B Munson
@ 2011-03-10 16:59   ` Eric B Munson
  3 siblings, 0 replies; 10+ messages in thread
From: Eric B Munson @ 2011-03-10 16:59 UTC (permalink / raw)
  To: Paul Menage
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	rdunlap-/UHa2rfvQTnk1uMJSBkQmQ, linux-doc-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 682 bytes --]

On Wed, 09 Mar 2011, Paul Menage wrote:

> On Wed, Mar 9, 2011 at 1:09 PM, Eric B Munson <emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org> wrote:
> >
> > +Note: To remove a task from a cgroup you must write its PID to the root
> > +tasks file.
> > +
> 
> This isn't really accurate - the root cgroup is a cgroup like all the
> others. More accurate would be something like:
> 
> Since every task is always a member of exactly one cgroup in each
> mounted hierarchy, to remove a task from its current cgroup you must
> move it into a new cgroup (possibly the root cgroup) by writing to the
> new cgroup's tasks file.
> 
> Paul
> 

I am going to lift that for V2.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 206 bytes --]

_______________________________________________
Containers mailing list
Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup
  2011-03-09 23:13 ` Paul Menage
  2011-03-10 14:44   ` Mike Heffner
  2011-03-10 14:44   ` Mike Heffner
@ 2011-03-10 16:59   ` Eric B Munson
  2011-03-10 16:59   ` Eric B Munson
  3 siblings, 0 replies; 10+ messages in thread
From: Eric B Munson @ 2011-03-10 16:59 UTC (permalink / raw)
  To: Paul Menage; +Cc: containers, rdunlap, linux-doc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

On Wed, 09 Mar 2011, Paul Menage wrote:

> On Wed, Mar 9, 2011 at 1:09 PM, Eric B Munson <emunson@mgebm.net> wrote:
> >
> > +Note: To remove a task from a cgroup you must write its PID to the root
> > +tasks file.
> > +
> 
> This isn't really accurate - the root cgroup is a cgroup like all the
> others. More accurate would be something like:
> 
> Since every task is always a member of exactly one cgroup in each
> mounted hierarchy, to remove a task from its current cgroup you must
> move it into a new cgroup (possibly the root cgroup) by writing to the
> new cgroup's tasks file.
> 
> Paul
> 

I am going to lift that for V2.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-10 16:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 21:09 [PATCH] Documentation: cgroups: Add notes on removing PIDs from tasks and cgroups requiring setup Eric B Munson
     [not found] ` <1299704969-4485-1-git-send-email-emunson-CVBTeua0HjReoWH0uzbU5w@public.gmane.org>
2011-03-09 23:07   ` Kirill A. Shutemov
2011-03-09 23:13   ` Paul Menage
2011-03-09 23:07 ` Kirill A. Shutemov
2011-03-09 23:13 ` Paul Menage
2011-03-10 14:44   ` Mike Heffner
2011-03-10 14:44   ` Mike Heffner
2011-03-10 16:59   ` Eric B Munson
2011-03-10 16:59   ` Eric B Munson
  -- strict thread matches above, loose matches on Subject: below --
2011-03-09 21:09 Eric B Munson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.