aboutsummaryrefslogtreecommitdiff
path: root/Documentation/controllers
AgeCommit message (Collapse)AuthorFilesLines
2008-04-29memcgroups: add a document describing the resource counter abstractionPavel Emelyanov1-0/+181
The resource counter is supposed to facilitate the resource accounting of arbitrary resource (and it already does this for memory controller). However, it is about to be used in other resources controllers (swap, kernel memory, networking, etc), so provide a doc describing how to work with it. This will eliminate all the possible future duplications in the appropriate controllers' docs. Fixed errors pointed out by Randy. [[email protected]: fix documentation tpyo] Signed-off-by: Pavel Emelyanov <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Balbir Singh <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Li Zefan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29cgroups: implement device whitelistSerge E. Hallyn1-0/+48
Implement a cgroup to track and enforce open and mknod restrictions on device files. A device cgroup associates a device access whitelist with each cgroup. A whitelist entry has 4 fields. 'type' is a (all), c (char), or b (block). 'all' means it applies to all types and all major and minor numbers. Major and minor are either an integer or * for all. Access is a composition of r (read), w (write), and m (mknod). The root device cgroup starts with rwm to 'all'. A child devcg gets a copy of the parent. Admins can then remove devices from the whitelist or add new entries. A child cgroup can never receive a device access which is denied its parent. However when a device access is removed from a parent it will not also be removed from the child(ren). An entry is added using devices.allow, and removed using devices.deny. For instance echo 'c 1:3 mr' > /cgroups/1/devices.allow allows cgroup 1 to read and mknod the device usually known as /dev/null. Doing echo a > /cgroups/1/devices.deny will remove the default 'a *:* mrw' entry. CAP_SYS_ADMIN is needed to change permissions or move another task to a new cgroup. A cgroup may not be granted more permissions than the cgroup's parent has. Any task can move itself between cgroups. This won't be sufficient, but we can decide the best way to adequately restrict movement later. [[email protected]: coding-style fixes] [[email protected]: fix may-be-used-uninitialized warning] Signed-off-by: Serge E. Hallyn <[email protected]> Acked-by: James Morris <[email protected]> Looks-good-to: Pavel Emelyanov <[email protected]> Cc: Daniel Hokka Zakrisson <[email protected]> Cc: Li Zefan <[email protected]> Cc: Paul Menage <[email protected]> Cc: Balbir Singh <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-03-04Memory controller: rename to Memory Resource ControllerBalbir Singh1-2/+6
Rename Memory Controller to Memory Resource Controller. Reflect the same changes in the CONFIG definition for the Memory Resource Controller. Group together the config options for Resource Counters and Memory Resource Controller. Signed-off-by: Balbir Singh <[email protected]> Cc: Paul Menage <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-03-04Memory Resource Controller use strstrip while parsing argumentsBalbir Singh1-3/+3
The memory controller has a requirement that while writing values, we need to use echo -n. This patch fixes the problem and makes the UI more consistent. Signed-off-by: Balbir Singh <[email protected]> Cc: Paul Menage <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-23memcgroup: fix and update documentationLi Zefan1-15/+9
- remove trailing " Bytes"s in the demonstration - remove section 4.4 (feature control_type has been removed) - fix reference section Signed-off-by: Li Zefan <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Balbir Singh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-07update Documentation/controller/memory.txtKAMEZAWA Hiroyuki1-16/+17
Documentation updates for memory controller. Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Reviewed-by: Balbir Singh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-07Memory controller improve user interfaceBalbir Singh1-5/+24
Change the interface to use bytes instead of pages. Page sizes can vary across platforms and configurations. A new strategy routine has been added to the resource counters infrastructure to format the data as desired. Suggested by David Rientjes, Andrew Morton and Herbert Poetzl Tested on a UML setup with the config for memory control enabled. [[email protected]: possible race fix in res_counter] Signed-off-by: Balbir Singh <[email protected]> Signed-off-by: Pavel Emelianov <[email protected]> Cc: Paul Menage <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Kirill Korotaev <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: David Rientjes <[email protected]> Cc: Vaidyanathan Srinivasan <[email protected]> Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-07Memory controller: add documentBalbir Singh1-0/+259
Signed-off-by: Balbir Singh <[email protected]> Cc: Pavel Emelianov <[email protected]> Cc: Paul Menage <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Nick Piggin <[email protected]> Cc: Kirill Korotaev <[email protected]> Cc: Herbert Poetzl <[email protected]> Cc: David Rientjes <[email protected]> Cc: Vaidyanathan Srinivasan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>