linux/Documentation
Michal Hocko f61c42a7d9 memcg: remove tasks/children test from mem_cgroup_force_empty()
Tejun has correctly pointed out that tasks/children test in
mem_cgroup_force_empty is not correct because there is no other locking
which preserves this state throughout the rest of the function so both
new tasks can join the group or new children groups can be added while
somebody is writing to memory.force_empty. A new task would break
mem_cgroup_reparent_charges expectation that all failures as described
by mem_cgroup_force_empty_list are temporal and there is no way out.

The main use case for the knob as described by
Documentation/cgroups/memory.txt is to:
"
  The typical use case for this interface is before calling rmdir().
  Because rmdir() moves all pages to parent, some out-of-use page caches can be
  moved to the parent. If you want to avoid that, force_empty will be useful.
"

This means that reparenting is not really required as rmdir will
reparent pages implicitly from the safe context. If we remove it from
mem_cgroup_force_empty then we are safe even with existing tasks because
the number of reclaim attempts is bounded. Moreover the knob still does
what the documentation claims (modulo reparenting which doesn't make any
difference) and users might expect. Longterm we want to deprecate the
whole knob and put the reparented pages to the tail of parent LRU during
cgroup removal.

tj: Removed unused variable @cgrp from mem_cgroup_force_empty()

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2014-05-16 13:22:48 -04:00
..
ABI More ACPI and power management fixes and updates for 3.15-rc1 2014-04-11 13:20:04 -07:00
DocBook Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2014-04-19 10:35:30 -07:00
EDID
PCI Merge branch 'pci/dead-code' into next 2014-02-20 14:32:34 -07:00
RCU documentation: Fix some inconsistencies in RTFP.txt 2014-02-17 14:56:10 -08:00
accounting
acpi ACPI and power management updates for 3.14-rc1 2014-01-24 15:51:02 -08:00
aoe
arm Merge branch 'mvebu/soc3' into next/dt 2014-03-17 12:13:09 +01:00
arm64 - Documentation clarification on CPU topology and booting requirements 2014-04-08 12:06:03 -07:00
auxdisplay
backlight
blackfin Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
block Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
blockdev zram: propagate error to user 2014-04-07 16:36:02 -07:00
bus-devices
cdrom
cgroups memcg: remove tasks/children test from mem_cgroup_force_empty() 2014-05-16 13:22:48 -04:00
connector connector: add portid to unicast in addition to broadcasting 2014-02-07 15:40:17 -08:00
console
cpu-freq cpufreq: Add stop CPU callback to cpufreq_driver interface 2014-03-20 03:50:12 +01:00
cpuidle
cris
crypto
development-process
device-mapper dm: add era target 2014-03-27 16:56:23 -04:00
devicetree Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-04-18 17:53:46 -07:00
driver-model Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-01-22 21:21:55 -08:00
dvb Linux 3.14-rc5 2014-03-11 06:55:49 -03:00
early-userspace
extcon
fault-injection
fb Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
filesystems Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-04-12 14:49:50 -07:00
firmware_class
fmc FMC: make eeprom attribute writable 2014-02-28 15:12:08 -08:00
frv
gpio gpio: make gpiod_direction_output take a logical value 2014-02-07 09:47:02 +01:00
hid HID: uhid: Add UHID_CREATE2 + UHID_INPUT2 2014-04-01 18:27:33 +02:00
hwmon Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2014-04-05 18:45:11 -07:00
i2c Documentation: i2c: improve section about flags mangling the protocol 2014-04-06 13:53:48 +02:00
i2o
ia64
ide Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
infiniband
input doc: fix double words 2014-03-21 13:16:58 +01:00
ioctl s390/hypfs: add interface for diagnose 0x304 2014-01-24 09:40:59 +01:00
isdn
ja_JP Documentation: Update stable address in Chinese and Japanese translations 2014-04-16 14:13:27 -07:00
kbuild kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT 2014-04-07 16:36:09 -07:00
kdump
ko_KR
laptops Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
leds Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
m68k Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
make
memory-devices
metag
mic
mips
misc-devices Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2014-01-29 18:56:27 -08:00
mmc
mn10300
mtd
namespaces
netlabel
networking Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
nfc
parisc
pcmcia
phy phy: Add new Exynos USB 2.0 PHY driver 2014-03-08 12:39:44 +05:30
power Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-04-02 16:23:38 -07:00
powerpc
pps
prctl
pti
ptp ptp: Fix compiler warnings in the testptp utility 2014-03-27 14:51:47 -04:00
rapidio rapidio: rework device hierarchy and introduce mport class of devices 2014-04-07 16:36:07 -07:00
s390 Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
scheduler asm/system.h: clean asm/system.h from docs 2014-04-07 16:36:11 -07:00
scsi [SCSI] megaraid_sas: Version and Changelog update 2014-03-15 10:19:21 -07:00
security doc: fix double words 2014-03-21 13:16:58 +01:00
serial Documentation/serial: Delete obsolete driver documentation 2014-04-16 14:20:34 -07:00
sh
sound x86, platforms: Remove SGI Visual Workstation 2014-02-27 08:07:39 -08:00
spi Merge remote-tracking branches 'spi/topic/s3c64xx', 'spi/topic/sc18is602', 'spi/topic/sh-hspi', 'spi/topic/sh-msiof', 'spi/topic/sh-sci', 'spi/topic/sirf' and 'spi/topic/spidev' into spi-next 2014-03-30 00:51:34 +00:00
sysctl hung_task: check the value of "sysctl_hung_task_timeout_sec" 2014-04-07 16:36:07 -07:00
target
thermal
timers Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
tpm
trace Most of the changes were largely clean ups, and some documentation. 2014-04-03 10:26:31 -07:00
usb doc: fix double words 2014-03-21 13:16:58 +01:00
vDSO
video4linux [media] s5p-fimc: Remove reference to outdated macro 2014-03-14 10:37:43 -03:00
virtual Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-04-02 16:23:38 -07:00
vm Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt 2014-04-18 16:40:08 -07:00
w1 Merge 3.14-rc3 into char-misc-next 2014-02-18 08:09:40 -08:00
watchdog watchdog: it87_wdt: Work around non-working CIR interrupts 2014-03-31 13:33:55 +02:00
wimax
x86 x86, boot: Correct max ramdisk size name 2014-03-13 15:32:42 -07:00
xtensa
zh_CN driver core fixes for 3.15-rc2 2014-04-18 16:59:52 -07:00
.gitignore
00-INDEX Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
BUG-HUNTING
Changes
CodingStyle
DMA-API-HOWTO.txt
DMA-API.txt
DMA-ISA-LPC.txt
DMA-attributes.txt
HOWTO
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
Intel-IOMMU.txt
Makefile
ManagementStyle
SAK.txt
SM501.txt
SecurityBugs
SubmitChecklist
SubmittingDrivers
SubmittingPatches Documentation/SubmittingPatches: update some dead URLs 2014-04-03 16:21:27 -07:00
VGA-softcursor.txt
applying-patches.txt
assoc_array.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
bcache.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
cachetlb.txt
circular-buffers.txt
clk.txt Documentation: clk: Add locking documentation 2014-03-19 14:56:06 -07:00
coccinelle.txt
cpu-hotplug.txt Doc/cpu-hotplug: Specify race-free way to register CPU hotplug callbacks 2014-03-20 13:43:40 +01:00
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-04-04 09:50:07 -07:00
digsig.txt
dma-buf-sharing.txt
dmaengine.txt
dmatest.txt
dontdiff Documentation: LLVMLinux: Update Documentation/dontdiff 2014-04-09 13:44:34 -07:00
dynamic-debug-howto.txt dynamic-debug-howto.txt: update since new wildcard support 2014-01-23 16:36:55 -08:00
edac.txt [media, edac] Change my email address 2014-02-07 08:03:07 -02:00
efi-stub.txt
eisa.txt
email-clients.txt
flexible-arrays.txt
futex-requeue-pi.txt doc: fix double words 2014-03-21 13:16:58 +01:00
gcov.txt
highuid.txt
hw_random.txt
hwspinlock.txt
init.txt
initrd.txt
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt
irqflags-tracing.txt asm/system.h: clean asm/system.h from docs 2014-04-07 16:36:11 -07:00
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt Documentation/serial: Delete obsolete driver documentation 2014-04-16 14:20:34 -07:00
kernel-per-CPU-kthreads.txt Documentation/kernel-per-CPU-kthreads.txt: Workqueue affinity 2014-02-17 14:56:08 -08:00
kmemcheck.txt doc: fix double words 2014-03-21 13:16:58 +01:00
kmemleak.txt Documentation/kmemleak.txt: updates 2014-04-03 16:21:27 -07:00
kobject.txt
kprobes.txt
kref.txt
ldm.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
lockup-watchdogs.txt
logo.gif
logo.txt
magic-number.txt Documentation/serial: Delete obsolete driver documentation 2014-04-16 14:20:34 -07:00
md.txt
media-framework.txt
memory-barriers.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-04-02 16:23:38 -07:00
memory-hotplug.txt
module-signing.txt Nothing major: the stricter permissions checking for sysfs broke 2014-04-06 09:38:07 -07:00
mono.txt
mutex-design.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt Use 'E' instead of 'X' for unsigned module taint flag. 2014-03-31 14:52:43 +10:30
padata.txt
parport-lowlevel.txt
parport.txt
percpu-rw-semaphore.txt
phy.txt drivers: phy: Add support for optional phys 2014-02-05 05:48:43 +00:00
pi-futex.txt
pinctrl.txt
pnp.txt
preempt-locking.txt
printk-formats.txt vsprintf: add %pad extension for dma_addr_t use 2014-01-23 16:36:56 -08:00
pwm.txt
ramoops.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
serial-console.txt
sgi-ioc4.txt
smsc_ece1099.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt stable_kernel_rules: spelling/word usage 2014-04-16 14:13:26 -07:00
static-keys.txt
svga.txt
sysfs-rules.txt
sysrq.txt
this_cpu_ops.txt
unaligned-memory-access.txt
unicode.txt
unshare.txt
vfio.txt
vgaarbiter.txt
video-output.txt
vme_api.txt
volatile-considered-harmful.txt
workqueue.txt
ww-mutex-design.txt
xz.txt
zorro.txt