|
|
|
[PATCH v4 25/25] Documentation: add documentation for slab tracker for memcg | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
In a separate patch, to aid reviewers. Signed-off-by: Glauber Costa <glommer@xxxxxxxxxxxxx> CC: Christoph Lameter <cl@xxxxxxxxx> CC: Pekka Enberg <penberg@xxxxxxxxxxxxxx> CC: Michal Hocko <mhocko@xxxxxxx> CC: Kamezawa Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> CC: Johannes Weiner <hannes@xxxxxxxxxxx> CC: Suleiman Souhlal <suleiman@xxxxxxxxxx> CC: Randy Dunlap <rdunlap@xxxxxxxxxxxx> --- Documentation/cgroups/memory.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 9b1067a..9ea82b5 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt @@ -74,6 +74,12 @@ Brief summary of control files. memory.kmem.tcp.limit_in_bytes # set/show hard limit for tcp buf memory memory.kmem.tcp.usage_in_bytes # show current tcp buf memory allocation + memory.kmem.limit_in_bytes # set/show hard limit for general kmem memory + memory.kmem.usage_in_bytes # show current general kmem memory allocation + memory.kmem.failcnt # show current number of kmem limit hits + memory.kmem.max_usage_in_bytes # show max kmem usage + memory.kmem.slabinfo # show cgroup-specific slab usage information + 1. History The memory controller has a long history. A request for comments for the memory @@ -270,6 +276,14 @@ cgroup may or may not be accounted. Currently no soft limit is implemented for kernel memory. It is future work to trigger slab reclaim when those limits are reached. +Kernel memory is not accounted until it is limited. Users that want to just +track kernel memory usage can set the limit value to a big enough value so +the limit is guaranteed to never hit. A kernel memory limit bigger than the +current memory limit will have this effect as well. + +This guarantes that this extension is backwards compatible to any previous +memory cgroup version. + 2.7.1 Current Kernel Memory resources accounted * sockets memory pressure: some sockets protocols have memory pressure @@ -278,6 +292,24 @@ per cgroup, instead of globally. * tcp memory pressure: sockets memory pressure for the tcp protocol. +* slab/kmalloc: + +When slab memory is tracked (memory.kmem.limit_in_bytes != -1ULL), both +memory.kmem.usage_in_bytes and memory.usage_in_bytes are updated. When +memory.kmem.limit_in_bytes is left alone, no tracking of slab caches takes +place. + +Because a slab page is shared among many tasks, it is not possible to take +any meaningful action upon task migration. Slabs created in a cgroup stay +around until the cgroup is destructed. Information about the slabs used +by the cgroup is displayed in the cgroup file memory.kmem.slabinfo. The format +of this file is and should remain compatible with /proc/slabinfo. + +Upon cgroup destruction, slabs that holds no live references are destructed. +Workers are fired to destroy the remaining caches as they objects are freed. + +Memory used by dead caches are shown in the proc file /proc/dead_slabinfo + 3. User Interface 0. Configuration @@ -286,6 +318,7 @@ a. Enable CONFIG_CGROUPS b. Enable CONFIG_RESOURCE_COUNTERS c. Enable CONFIG_CGROUP_MEM_RES_CTLR d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension) +d. Enable CONFIG_CGROUP_MEM_RES_CTLR_KMEM (to use experimental kmem extension) 1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?) # mount -t tmpfs none /sys/fs/cgroup -- 1.7.10.2 -- 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/
[Other Archives] [Linux Kernel Newbies] [Linux Driver Development] [Fedora Kernel] [Linux Kernel Testers] [Linux SH] [Linux Omap] [Linux Kbuild] [Linux Tape] [Linux Input] [Linux Kernel Janitors] [Linux Kernel Packagers] [Linux Doc] [Linux Man Pages] [Linux API] [Linux Memory Management] [Linux Modules] [Linux Standards] [Kernel Announce] [Netdev] [Git] [Linux PCI] Linux CAN Development [Linux I2C] [Linux RDMA] [Linux NUMA] [Netfilter] [Netfilter Devel] [SELinux] [Bugtraq] [FIO] [Linux Perf Users] [Linux Serial] [Linux PPP] [Linux ISDN] [Linux Next] [Kernel Stable Commits] [Linux Tip Commits] [Kernel MM Commits] [Linux Security Module] [AutoFS] [Filesystem Development] [Ext3 Filesystem] [Linux bcache] [Ext4 Filesystem] [Linux BTRFS] [Linux CEPH Filesystem] [Linux XFS] [XFS] [Linux NFS] [Linux CIFS] [Ecryptfs] [Linux NILFS] [Linux Cachefs] [Reiser FS] [Initramfs] [Linux FB Devel] [Linux OpenGL] [DRI Devel] [Fastboot] [Linux RT Users] [Linux RT Stable] [eCos] [Corosync] [Linux Clusters] [LVS Devel] [Hot Plug] [Linux Virtualization] [KVM] [KVM PPC] [KVM ia64] [Linux Containers] [Linux Hexagon] [Linux Cgroups] [Util Linux] [Wireless] [Linux Bluetooth] [Bluez Devel] [Ethernet Bridging] [Embedded Linux] [Barebox] [Linux MMC] [Linux IIO] [Sparse] [Smatch] [Linux Arch] [x86 Platform Driver] [Linux ACPI] [Linux IBM ACPI] [LM Sensors] [CPU Freq] [Linux Power Management] [Linmodems] [Linux DCCP] [Linux SCTP] [ALSA Devel] [Linux USB] [Linux PA RISC] [Linux Samsung SOC] [MIPS Linux] [IBM S/390 Linux] [ARM Linux] [ARM Kernel] [ARM MSM] [Tegra Devel] [Sparc Linux] [Linux Security] [Linux Sound] [Linux Media] [Video 4 Linux] [Linux IRDA Users] [Linux for the blind] [Linux RAID] [Linux ATA RAID] [Device Mapper] [Linux SCSI] [SCSI Target Devel] [Linux SCSI Target Infrastructure] [Linux IDE] [Linux SMP] [Linux AXP] [Linux Alpha] [Linux M68K] [Linux ia64] [Linux 8086] [Linux x86_64] [Linux Config] [Linux Apps] [Linux MSDOS] [Linux X.25] [Linux Crypto] [DM Crypt] [Linux Trace Users] [Linux Btrace] [Linux Watchdog] [Utrace Devel] [Linux C Programming] [Linux Assembly] [Dash] [DWARVES] [Hail Devel] [Linux Kernel Debugger] [Linux gcc] [Gcc Help] [X.Org] [Wine]
![]() |
![]() |
[Older Kernel Discussion] [Yosemite National Park Forum] [Large Format Photos] [Gimp] [Yosemite Photos] [Stuff]