linux_dsm_epyc7002/Documentation
David Rientjes def5efe037 mm, madvise: fail with ENOMEM when splitting vma will hit max_map_count
If madvise(2) advice will result in the underlying vma being split and
the number of areas mapped by the process will exceed
/proc/sys/vm/max_map_count as a result, return ENOMEM instead of EAGAIN.

EAGAIN is returned by madvise(2) when a kernel resource, such as slab,
is temporarily unavailable.  It indicates that userspace should retry
the advice in the near future.  This is important for advice such as
MADV_DONTNEED which is often used by malloc implementations to free
memory back to the system: we really do want to free memory back when
madvise(2) returns EAGAIN because slab allocations (for vmas, anon_vmas,
or mempolicies) cannot be allocated.

Encountering /proc/sys/vm/max_map_count is not a temporary failure,
however, so return ENOMEM to indicate this is a more serious issue.  A
followup patch to the man page will specify this behavior.

Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701241431120.42507@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-24 17:46:55 -08:00
..
ABI First set of updates for 4.11 kernel merge window 2017-02-23 08:27:57 -08:00
accounting
acpi
admin-guide Merge branch 'akpm' (patches from Andrew) 2017-02-22 19:29:24 -08:00
aoe
arm
arm64 arm64: Work around Falkor erratum 1003 2017-02-10 11:22:12 +00:00
auxdisplay
backlight
blackfin
block A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
blockdev zram: remove obsolete sysfs attrs 2017-02-22 16:41:30 -08:00
bus-devices
cdrom cdrom: Make device operations read-only 2017-02-14 08:29:56 -07:00
cgroup-v1
cma
connector
console
core-api
cpu-freq A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
cpuidle
cris
crypto crypto: doc - fix typo 2017-02-15 13:23:49 +08:00
dev-tools Improve sparse documentation 2017-02-15 15:09:13 -07:00
device-mapper dm cache metadata: add "metadata2" feature 2017-02-16 13:12:47 -05:00
devicetree Less anger inducing pull request for 4.11 2017-02-23 18:58:18 -08:00
dmaengine
doc-guide
DocBook A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
driver-api Less anger inducing pull request for 4.11 2017-02-23 18:58:18 -08:00
driver-model irqdesc: Add a resource managed version of irq_alloc_descs() 2017-02-10 14:39:20 +01:00
early-userspace
EDID
extcon
fault-injection
fb
features
filesystems rxrpc: Change module filename to rxrpc.ko 2017-02-17 15:09:19 -05:00
firmware_class
fmc
fpga fpga: Add scatterlist based programming 2017-02-10 15:20:44 +01:00
frv
gpio
gpu Less anger inducing pull request for 4.11 2017-02-23 18:58:18 -08:00
hid
hwmon A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
i2c
ia64
ide
iio
infiniband
input Documentation: input: fix path to input code definitions 2017-02-12 15:19:00 -07:00
ioctl rpmsg updates for v4.11 2017-02-23 09:41:03 -08:00
isdn
kbuild
kdump
laptops
leds
livepatch A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
locking
m68k
media A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
memory-devices
metag
mic
mips
misc-devices
mmc
mn10300
mtd
namespaces
netlabel
networking A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
nfc
nios2
nvdimm
nvmem
parisc
PCI Merge branch 'pci/msi' into next 2017-02-15 11:56:10 -06:00
pcmcia
perf perf: add qcom l2 cache perf events driver 2017-02-08 19:32:24 +00:00
phy
platform
power A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
powerpc
pps
prctl
process
pti
ptp
rapidio
RCU
s390
scheduler
scsi
security This renames the (now inaccurate) CONFIG_DEBUG_RODATA and related config 2017-02-21 17:56:45 -08:00
serial
sh
sound
sphinx
sphinx-static
spi spi: spi-ep93xx: simplify GPIO chip selects 2017-02-16 20:10:26 +00:00
sysctl mm, madvise: fail with ENOMEM when splitting vma will hit max_map_count 2017-02-24 17:46:55 -08:00
target
thermal
timers time: Remove CONFIG_TIMER_STATS 2017-02-10 11:15:08 +01:00
trace trace-vmscan-postprocess: sync with tracepoints updates 2017-02-22 16:41:29 -08:00
translations Documentation: Fix linux-api list typo 2017-02-15 15:12:26 -07:00
usb A slightly quieter cycle for documentation this time around. 2017-02-22 18:51:29 -08:00
virtual KVM: race-free exit from KVM_RUN without POSIX signals 2017-02-17 12:27:37 +01:00
vm mm, madvise: fail with ENOMEM when splitting vma will hit max_map_count 2017-02-24 17:46:55 -08:00
w1
watchdog
wimax
x86 efi: Get and store the secure boot status 2017-02-07 10:42:10 +01:00
xtensa
.gitignore
00-INDEX
bcache.txt
bt8xxgpio.txt
btmrvl.txt
bus-virt-phys-mapping.txt
cachetlb.txt
cgroup-v2.txt
Changes
circular-buffers.txt
clk.txt
CodingStyle
conf.py docs: Remove the copyright year from conf.py 2017-02-06 11:52:19 -07:00
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt
DMA-ISA-LPC.txt Documentation: DMA-ISA-LPC.txt 2017-02-12 15:20:07 -07:00
docutils.conf
dontdiff
efi-stub.txt
eisa.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcc-plugins.txt
highuid.txt
hw_random.txt
hwspinlock.txt
index.rst
intel_txt.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isa.txt
isapnp.txt
kernel-doc-nano-HOWTO.txt
kernel-per-CPU-kthreads.txt
kobject.txt
kprobes.txt
kref.txt
kselftest.txt
ldm.txt
lockup-watchdogs.txt
logo.gif
logo.txt
lzo.txt
mailbox.txt
Makefile
Makefile.sphinx Add a target to check broken external links in the Documentation 2017-02-15 15:22:47 -07:00
md-cluster.txt
memory-barriers.txt
memory-hotplug.txt
men-chameleon-bus.txt
nommu-mmap.txt
ntb.txt
numastat.txt
padata.txt
parport-lowlevel.txt
percpu-rw-semaphore.txt
phy.txt
pi-futex.txt
pinctrl.txt
pnp.txt
preempt-locking.txt
printk-formats.txt
pwm.txt
rbtree.txt
remoteproc.txt
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rtc.txt
SAK.txt
sgi-ioc4.txt
siphash.txt
SM501.txt
smsc_ece1099.txt
static-keys.txt
SubmittingPatches
svga.txt
sync_file.txt
this_cpu_ops.txt
unaligned-memory-access.txt
unshare.txt
vfio-mediated-device.txt
vfio.txt
video-output.txt
xillybus.txt
xz.txt
zorro.txt