linux/Documentation
Shakeel Butt 1e577f970f mm, memcg: introduce memory.events.local
The memory controller in cgroup v2 exposes memory.events file for each
memcg which shows the number of times events like low, high, max, oom
and oom_kill have happened for the whole tree rooted at that memcg.
Users can also poll or register notification to monitor the changes in
that file.  Any event at any level of the tree rooted at memcg will
notify all the listeners along the path till root_mem_cgroup.  There are
existing users which depend on this behavior.

However there are users which are only interested in the events
happening at a specific level of the memcg tree and not in the events in
the underlying tree rooted at that memcg.  One such use-case is a
centralized resource monitor which can dynamically adjust the limits of
the jobs running on a system.  The jobs can create their sub-hierarchy
for their own sub-tasks.  The centralized monitor is only interested in
the events at the top level memcgs of the jobs as it can then act and
adjust the limits of the jobs.  Using the current memory.events for such
centralized monitor is very inconvenient.  The monitor will keep
receiving events which it is not interested and to find if the received
event is interesting, it has to read memory.event files of the next
level and compare it with the top level one.  So, let's introduce
memory.events.local to the memcg which shows and notify for the events
at the memcg level.

Now, does memory.stat and memory.pressure need their local versions.  IMHO
no due to the no internal process contraint of the cgroup v2.  The
memory.stat file of the top level memcg of a job shows the stats and
vmevents of the whole tree.  The local stats or vmevents of the top level
memcg will only change if there is a process running in that memcg but v2
does not allow that.  Similarly for memory.pressure there will not be any
process in the internal nodes and thus no chance of local pressure.

Link: http://lkml.kernel.org/r/20190527174643.209172-1-shakeelb@google.com
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Roman Gushchin <guro@fb.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Chris Down <chris@chrisdown.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-12 11:05:43 -07:00
..
ABI Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
EDID docs: EDID/HOWTO.txt: convert it and rename to howto.rst 2019-06-14 14:32:29 -06:00
PCI
RCU It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
accelerators docs: mark orphan documents as such 2019-06-08 13:42:11 -06:00
accounting
acpi/dsd docs: fix broken documentation links 2019-06-08 13:42:13 -06:00
admin-guide mm, memcg: introduce memory.events.local 2019-07-12 11:05:43 -07:00
aoe docs: aoe: convert docs to ReST and rename to *.rst 2019-06-14 14:20:22 -06:00
arm docs: mark orphan documents as such 2019-06-08 13:42:11 -06:00
arm64 It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
auxdisplay
backlight
block for-5.3/block-20190708 2019-07-09 10:45:06 -07:00
blockdev
bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
bus-devices
cdrom docs: ide: convert docs to ReST and rename to *.rst 2019-06-14 14:21:18 -06:00
cgroup-v1 for-5.3/block-20190708 2019-07-09 10:45:06 -07:00
cma
connector
console
core-api asm-generic, x86: add bitops instrumentation for KASAN 2019-07-12 11:05:42 -07:00
cpu-freq
crypto crypto: doc - Fix formatting of new crypto engine content 2019-07-03 22:13:12 +08:00
dev-tools docs: kmemleak: add more documentation details 2019-07-12 11:05:42 -07:00
device-mapper docs: convert docs to ReST and rename to *.rst 2019-06-14 14:21:04 -06:00
devicetree Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
doc-guide Doc : doc-guide : Fix a typo 2019-06-28 09:04:14 -06:00
driver-api Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
driver-model i2c: core: add device-managed version of i2c_new_dummy 2019-05-17 19:29:40 +02:00
early-userspace
fault-injection It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
fb docs: fb: Add TER16x32 to the available font names 2019-06-20 13:55:20 -06:00
features Documentation/stackprotector: powerpc supports stack protector 2019-06-14 14:44:43 -06:00
filesystems Highlights: 2019-07-10 21:22:43 -07:00
firmware-guide It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
firmware_class
fpga docs: fpga: convert docs to ReST and rename to *.rst 2019-06-14 14:21:15 -06:00
gpio
gpu docs: mark orphan documents as such 2019-06-08 13:42:11 -06:00
hid docs: stop suggesting strlcpy 2019-06-20 14:08:49 -06:00
hwmon
i2c docs: stop suggesting strlcpy 2019-06-20 14:08:49 -06:00
ia64
ide docs: ide: convert docs to ReST and rename to *.rst 2019-06-14 14:21:18 -06:00
iio
infiniband
input
interconnect docs: mark orphan documents as such 2019-06-08 13:42:11 -06:00
ioctl
isdn isdn: remove isdn4linux 2019-05-31 11:13:10 +02:00
kbuild docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
kdump docs: kdump: convert docs to ReST and rename to *.rst 2019-06-14 14:21:24 -06:00
kernel-hacking docs: stop suggesting strlcpy 2019-06-20 14:08:49 -06:00
laptops It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
leds docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
lightnvm
livepatch
locking locking/lockdep: Add explanation to lock usage rules in lockdep design doc 2019-06-03 11:55:48 +02:00
m68k
maintainer docs: Add a document on repository management 2019-06-18 09:33:16 -06:00
md
media media: doc-rst: Fix typos 2019-06-27 07:35:47 -04:00
memory-devices
mic docs: mic: convert docs to ReST and rename to *.rst 2019-06-14 14:23:26 -06:00
mips
misc-devices
mmc
mtd
namespaces
netlabel docs: netlabel: convert docs to ReST and rename to *.rst 2019-06-14 14:23:30 -06:00
networking Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
nfc
nios2
nvdimm Documentation: nvdimm: Fix typo 2019-06-07 11:39:04 -06:00
nvmem
openrisc
parisc
pcmcia docs: pcmcia: convert docs to ReST and rename to *.rst 2019-06-14 14:23:35 -06:00
perf
phy
power
powerpc docs: kdump: convert docs to ReST and rename to *.rst 2019-06-14 14:21:24 -06:00
process Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
pti
rapidio
riscv docs: riscv: convert docs to ReST and rename to *.rst 2019-06-14 14:31:32 -06:00
s390 docs: s390: s390dbf: typos and formatting, update crash command 2019-07-05 13:42:24 +02:00
scheduler It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
scsi
security Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
serial
sh
sound
sparc
sphinx docs: automarkup.py: ignore exceptions when seeking for xrefs 2019-07-08 14:35:47 -06:00
sphinx-static
spi
sysctl It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
target docs: target: convert docs to ReST and rename to *.rst 2019-06-14 14:31:36 -06:00
thermal
timers docs: timers: convert docs to ReST and rename to *.rst 2019-06-14 14:31:48 -06:00
trace docs: trace: add a missing blank line 2019-06-20 14:05:46 -06:00
translations It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
usb USB: rio500: update Documentation 2019-05-21 10:11:19 +02:00
userspace-api Documentation: Add section about CPU vulnerabilities for Spectre 2019-06-26 11:42:41 -06:00
virtual It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
vm It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
w1
watchdog docs: watchdog: convert docs to ReST and rename to *.rst 2019-06-14 14:32:05 -06:00
wimax
x86 It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
xilinx docs: xilinx: convert eemi.txt to eemi.rst 2019-06-14 14:32:10 -06:00
xtensa
.gitignore
Changes
CodingStyle
DMA-API-HOWTO.txt
DMA-API.txt Documentation: DMA-API: fix a function name of max_mapping_size 2019-06-07 11:10:33 -06:00
DMA-ISA-LPC.txt
DMA-attributes.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
Intel-IOMMU.txt
Kconfig docs: Kbuild/Makefile: allow check for missing docs at build time 2019-06-07 11:33:16 -06:00
Makefile docs: Kbuild/Makefile: allow check for missing docs at build time 2019-06-07 11:33:16 -06:00
SAK.txt
SM501.txt
SubmittingPatches
atomic_bitops.txt
atomic_t.txt Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 16:12:03 -07:00
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
clearing-warn-once.txt
conf.py Disable Sphinx SmartyPants in HTML output 2019-06-30 15:30:34 -06:00
cpu-load.txt
cputopology.txt topology: Create core_cpus and die_cpus sysfs attributes 2019-05-23 10:08:34 +02:00
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
docutils.conf doc-rst: Add missing newline at end of file 2019-06-20 14:16:56 -06:00
dontdiff
efi-stub.txt
eisa.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst Documentation: Remove duplicate x86 index entry 2019-06-14 11:02:13 -06:00
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt block: document iostat changes for disk busy time accounting 2019-06-14 14:46:43 -06:00
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-per-CPU-kthreads.txt docs: watchdog: convert docs to ReST and rename to *.rst 2019-06-14 14:32:05 -06:00
kobject.txt
kprobes.txt
kref.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lsm.txt
lzo.txt
mailbox.txt
memory-barriers.txt It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
men-chameleon-bus.txt
nommu-mmap.txt
ntb.txt
numastat.txt
packing.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
pwm.txt pwm: Add power management descriptions 2019-06-26 11:39:11 +02:00
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt
sgi-ioc4.txt
siphash.txt
smsc_ece1099.txt
speculation.txt
static-keys.txt
svga.txt
switchtec.txt
sync_file.txt
tee.txt Documentation: tee: Grammar s/the its/its/ 2019-06-07 11:23:38 -06:00
this_cpu_ops.txt
unaligned-memory-access.txt
vfio-mediated-device.txt
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt