linux-stable/drivers
Johannes Weiner dc56401fc9 mm: oom_kill: simplify OOM killer locking
The zonelist locking and the oom_sem are two overlapping locks that are
used to serialize global OOM killing against different things.

The historical zonelist locking serializes OOM kills from allocations with
overlapping zonelists against each other to prevent killing more tasks
than necessary in the same memory domain.  Only when neither tasklists nor
zonelists from two concurrent OOM kills overlap (tasks in separate memcgs
bound to separate nodes) are OOM kills allowed to execute in parallel.

The younger oom_sem is a read-write lock to serialize OOM killing against
the PM code trying to disable the OOM killer altogether.

However, the OOM killer is a fairly cold error path, there is really no
reason to optimize for highly performant and concurrent OOM kills.  And
the oom_sem is just flat-out redundant.

Replace both locking schemes with a single global mutex serializing OOM
kills regardless of context.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-24 17:49:43 -07:00
..
accessibility
acpi Power management and ACPI material for v4.2-rc1 2015-06-23 14:18:07 -07:00
amba
android
ata Merge branch 'for-4.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2015-06-08 08:47:08 -07:00
atm
auxdisplay
base regmap: Fixes for v4.2 2015-06-23 17:25:32 -07:00
bcma
block SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
bluetooth
bus Power management and ACPI material for v4.2-rc1 2015-06-23 14:18:07 -07:00
cdrom
char powerpc updates for 4.2 2015-06-24 08:46:32 -07:00
clk fbdev changes for 4.2 2015-06-23 16:23:30 -07:00
clocksource clocksource: Increase dependencies of timer-stm32 to limit build wreckage 2015-06-21 20:01:48 +02:00
connector
cpufreq Power management and ACPI material for v4.2-rc1 2015-06-23 14:18:07 -07:00
cpuidle Merge branch 'pm-cpuidle' 2015-06-22 15:15:36 +02:00
crypto Power management and ACPI material for v4.2-rc1 2015-06-23 14:18:07 -07:00
dca
devfreq
dio
dma Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
dma-buf
edac
eisa
extcon
firewire
firmware Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:10:44 -07:00
fmc
gpio This is the big bulk of GPIO changes queued for the v4.2 2015-06-23 13:34:02 -07:00
gpu Power management and ACPI material for v4.2-rc1 2015-06-23 14:18:07 -07:00
hid Merge branches 'for-4.2/i2c-hid', 'for-4.2/lenovo', 'for-4.2/plantronics', 'for-4.2/rmi', 'for-4.2/sensor-hub', 'for-4.2/sjoy', 'for-4.2/sony' and 'for-4.2/wacom' into for-linus 2015-06-22 16:23:43 +02:00
hsi HSI: nokia-modem: use flags argument of devm_gpiod_get to set direction 2015-06-23 02:40:03 +02:00
hv
hwmon hwmon changes for v4.2 2015-06-23 13:39:56 -07:00
hwspinlock
hwtracing/coresight
i2c == Changes to existing drivers == 2015-06-23 17:31:27 -07:00
ide
idle
iio
infiniband SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
input == Changes to existing drivers == 2015-06-23 17:31:27 -07:00
iommu IOMMU Updates for Linux v4.2 2015-06-23 18:27:19 -07:00
ipack
irqchip Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 19:42:56 -07:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-06-23 14:08:54 -07:00
leds
lguest Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
macintosh macintosh/nvram: Remove as unused 2015-06-15 16:42:37 +10:00
mailbox
mcb
md md: make sure MD_RECOVERY_DONE is clear before starting recovery/resync 2015-06-12 20:16:33 +10:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-06-23 14:08:54 -07:00
memory
memstick
message fusion: remove dead MTRR code 2015-06-13 08:44:14 -07:00
mfd == Changes to existing drivers == 2015-06-23 17:31:27 -07:00
misc cxl: Fix typo in debug print 2015-06-19 17:10:30 +10:00
mmc mmc: queue: prevent soft lockups on PREEMPT=n 2015-06-18 09:21:04 +02:00
mtd powerpc updates for 4.2 2015-06-24 08:46:32 -07:00
net Changes for 4.2 2015-06-23 15:53:26 -07:00
nfc
ntb PCI changes for the v4.2 merge window: 2015-06-23 13:41:24 -07:00
nubus
of arm64 updates for 4.2, mostly refactoring/clean-up: 2015-06-24 10:02:15 -07:00
oprofile
parisc
parport
pci Power management and ACPI material for v4.2-rc1 2015-06-23 14:18:07 -07:00
pcmcia pcmcia: do not break rsrc_nonstatic when handling anonymous cards 2015-06-16 07:29:39 +02:00
phy
pinctrl
platform == Changes to existing drivers == 2015-06-23 17:31:27 -07:00
pnp Merge branches 'pnp' and 'pm-tools' 2015-06-19 01:18:43 +02:00
power power supply and reset changes for the v4.2 series 2015-06-23 16:10:27 -07:00
powercap
pps
ps3
ptp
pwm pwm: Changes for v4.2-rc1 2015-06-23 13:32:38 -07:00
rapidio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-06-23 14:08:54 -07:00
ras
regulator == Changes to existing drivers == 2015-06-23 17:31:27 -07:00
remoteproc
reset
rpmsg
rtc == Changes to existing drivers == 2015-06-23 17:31:27 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-06-24 08:45:27 -07:00
sbus
scsi SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
sfi
sh
sn
soc
spi Merge remote-tracking branches 'spi/topic/sirf', 'spi/topic/spidev' and 'spi/topic/zynq' into spi-next 2015-06-18 00:19:56 +01:00
spmi
ssb SSB: Fix handling of ssb_pmu_get_alp_clock() 2015-06-09 16:38:06 +02:00
staging mm: oom_kill: clean up victim marking and exiting interfaces 2015-06-24 17:49:43 -07:00
target SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
tc
thermal
thunderbolt
tty mm: oom_kill: simplify OOM killer locking 2015-06-24 17:49:43 -07:00
uio
usb SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
uwb
vfio powerpc updates for 4.2 2015-06-24 08:46:32 -07:00
vhost SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
video fbdev changes for 4.2 2015-06-23 16:23:30 -07:00
virt
virtio PCI changes for the v4.2 merge window: 2015-06-23 13:41:24 -07:00
vlynq
vme
w1
watchdog
xen SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
zorro
Kconfig
Makefile