David Rientjes
5ff7091f5a
mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks
...
Commit 4d4bbd8526 ("mm, oom_reaper: skip mm structs with mmu
notifiers") prevented the oom reaper from unmapping private anonymous
memory with the oom reaper when the oom victim mm had mmu notifiers
registered.
The rationale is that doing mmu_notifier_invalidate_range_{start,end}()
around the unmap_page_range(), which is needed, can block and the oom
killer will stall forever waiting for the victim to exit, which may not
be possible without reaping.
That concern is real, but only true for mmu notifiers that have
blockable invalidate_range_{start,end}() callbacks. This patch adds a
"flags" field to mmu notifier ops that can set a bit to indicate that
these callbacks do not block.
The implementation is steered toward an expensive slowpath, such as
after the oom reaper has grabbed mm->mmap_sem of a still alive oom
victim.
[[email protected] : mmu_notifier_invalidate_range_end() can also call the invalidate_range() must not block, fix comment]
Link: http://lkml.kernel.org/r/[email protected]
[[email protected] : make mm_has_blockable_invalidate_notifiers() return bool, use rwsem_is_locked()]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Rientjes <[email protected] >
Acked-by: Michal Hocko <[email protected] >
Acked-by: Paolo Bonzini <[email protected] >
Acked-by: Christian König <[email protected] >
Acked-by: Dimitri Sivanich <[email protected] >
Cc: Andrea Arcangeli <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Oded Gabbay <[email protected] >
Cc: Alex Deucher <[email protected] >
Cc: David Airlie <[email protected] >
Cc: Joerg Roedel <[email protected] >
Cc: Doug Ledford <[email protected] >
Cc: Jani Nikula <[email protected] >
Cc: Mike Marciniszyn <[email protected] >
Cc: Sean Hefty <[email protected] >
Cc: Boris Ostrovsky <[email protected] >
Cc: Jérôme Glisse <[email protected] >
Cc: Radim Krčmář <[email protected] >
Signed-off-by: David Rientjes <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2018-01-31 17:18:38 -08:00
..
accessibility
acpi
DMAengine updates for v4.16-rc1
2018-01-31 11:52:20 -08:00
amba
android
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
ata
Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
2018-01-30 14:48:30 -08:00
atm
auxdisplay
base
DMAengine updates for v4.16-rc1
2018-01-31 11:52:20 -08:00
bcma
bcma: Fix 'allmodconfig' and BCMA builds on MIPS targets
2018-01-16 21:13:55 +02:00
block
Merge branch 'work.sock_recvmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 18:59:03 -08:00
bluetooth
bus
Merge branches 'pm-domains', 'pm-kconfig', 'pm-cpuidle' and 'powercap'
2018-01-18 02:54:45 +01:00
cdrom
char
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
clk
clocksource
clocksource/drivers/stm32: Start the timer's counter sooner
2018-01-08 17:57:26 +01:00
connector
cpufreq
Merge branch 'pm-cpufreq-thermal' into pm-cpufreq
2018-01-18 02:52:42 +01:00
cpuidle
cpuidle: Avoid NULL argument in cpuidle_switch_governor()
2018-01-05 14:01:30 +01:00
crypto
dma-mapping: move swiotlb arch helpers to a new header
2018-01-10 16:40:54 +01:00
dax
dca
devfreq
dio
dma
DMAengine updates for v4.16-rc1
2018-01-31 11:52:20 -08:00
dma-buf
edac
EDAC, mv64x60: Fix an error handling path
2018-01-09 20:14:23 +01:00
eisa
extcon
firewire
firmware
arm64 updates for 4.16:
2018-01-30 13:57:43 -08:00
fmc
fpga
fsi
gpio
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
gpu
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-31 09:25:20 -08:00
hid
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
hsi
hv
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
hwmon
hwmon: (dell-smm) Disable fan support for Dell Vostro 3360
2018-01-27 09:34:22 -08:00
hwspinlock
hwtracing
arm64 updates for 4.16:
2018-01-30 13:57:43 -08:00
i2c
Power management updates for v4.16-rc1
2018-01-29 09:47:41 -08:00
ide
idle
iio
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
infiniband
mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks
2018-01-31 17:18:38 -08:00
input
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
iommu
mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks
2018-01-31 17:18:38 -08:00
ipack
irqchip
arm64 updates for 4.16:
2018-01-30 13:57:43 -08:00
isdn
Merge branch 'work.sock_recvmsg' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 18:59:03 -08:00
leds
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
lightnvm
lightnvm: pblk: refactor pblk_ppa_comp function
2018-01-05 08:50:12 -07:00
macintosh
mailbox
mcb
md
- DM core fixes to ensure that bio submission follows a depth-first tree
2018-01-31 11:05:47 -08:00
media
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-31 09:25:20 -08:00
memory
mtd: onenand: omap2: Configure driver from DT
2018-01-12 16:41:15 +01:00
memstick
message
scsi: mptsas: remove duplicated assignment to pointer head
2018-01-17 01:19:38 -05:00
mfd
regmap: Updates for v4.16
2018-01-29 11:35:24 -08:00
misc
mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks
2018-01-31 17:18:38 -08:00
mmc
There are two major achievements for MMC in this release, which deserves to be
2018-01-29 11:26:11 -08:00
mtd
dma mapping changes for Linux 4.16:
2018-01-31 11:32:27 -08:00
mux
mux: core: fix double get_device()
2018-01-09 14:19:41 +01:00
net
First merge window pull request for 4.16
2018-01-31 12:05:10 -08:00
nfc
ntb
nubus
nubus: Add support for the driver model
2018-01-16 16:47:29 +01:00
nvdimm
nvme
Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block
2018-01-29 11:51:49 -08:00
nvmem
of
DMAengine updates for v4.16-rc1
2018-01-31 11:52:20 -08:00
opp
oprofile
parisc
parport
pci
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
pcmcia
perf
perf: dsu: Use signed field for dsu_pmu->num_counters
2018-01-15 18:02:17 +00:00
phy
Merge branch 'for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
2018-01-30 14:48:30 -08:00
pinctrl
platform
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
pnp
power
PM / AVS: rockchip-io: account for const type of of_device_id.data
2018-01-05 13:36:33 +01:00
powercap
powercap: intel_rapl: Fix trailing semicolon
2018-01-17 12:56:24 +01:00
pps
ps3
ptp
pwm
rapidio
ras
mm/memory_failure: Remove unused trapno from memory_failure
2018-01-23 12:17:42 -06:00
regulator
Merge remote-tracking branch 'regulator/topic/tps65218' into regulator-next
2018-01-26 17:57:05 +00:00
remoteproc
reset
rpmsg
rtc
s390
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
sbus
scsi
SCSI misc on 20180131
2018-01-31 11:23:28 -08:00
sfi
sh
sn
soc
spi
Merge remote-tracking branch 'spi/topic/xilinx' into spi-next
2018-01-26 17:57:34 +00:00
spmi
ssb
ssb: Disable PCI host for PCI_DRIVERS_GENERIC
2018-01-16 21:15:58 +02:00
staging
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-31 09:25:20 -08:00
target
Merge branch 'for-4.16/block' of git://git.kernel.dk/linux-block
2018-01-29 11:51:49 -08:00
tc
tee
thermal
thunderbolt
tty
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
uio
usb
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
uwb
vfio
vhost
Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2018-01-30 17:58:07 -08:00
video
m68k updates for 4.16
2018-01-29 16:37:15 -08:00
virt
virtio
vlynq
vme
w1
watchdog
watchdog: Add RAVE SP watchdog driver
2018-01-08 10:08:36 +00:00
xen
dma mapping changes for Linux 4.16:
2018-01-31 11:32:27 -08:00
zorro
Kconfig
Makefile