David Rientjes
778c14affa
mm, oom: base root bonus on current usage
...
A 3% of system memory bonus is sometimes too excessive in comparison to
other processes.
With commit a63d83f427 ("oom: badness heuristic rewrite"), the OOM
killer tries to avoid killing privileged tasks by subtracting 3% of
overall memory (system or cgroup) from their per-task consumption. But
as a result, all root tasks that consume less than 3% of overall memory
are considered equal, and so it only takes 33+ privileged tasks pushing
the system out of memory for the OOM killer to do something stupid and
kill dhclient or other root-owned processes. For example, on a 32G
machine it can't tell the difference between the 1M agetty and the 10G
fork bomb member.
The changelog describes this 3% boost as the equivalent to the global
overcommit limit being 3% higher for privileged tasks, but this is not
the same as discounting 3% of overall memory from _every privileged task
individually_ during OOM selection.
Replace the 3% of system memory bonus with a 3% of current memory usage
bonus.
By giving root tasks a bonus that is proportional to their actual size,
they remain comparable even when relatively small. In the example
above, the OOM killer will discount the 1M agetty's 256 badness points
down to 179, and the 10G fork bomb's 262144 points down to 183500 points
and make the right choice, instead of discounting both to 0 and killing
agetty because it's first in the task list.
Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-01-30 16:56:56 -08:00
..
caching
FS-Cache: Provide the ability to enable/disable cookies
2013-09-27 18:40:25 +01:00
cifs
cifs: update cifs.txt and remove some outdated infos
2013-09-13 16:29:58 -05:00
configfs
configfs: convert to umode_t
2012-01-03 22:54:57 -05:00
nfs
nfsd4: update 4.1 nfsd status documentation
2013-12-10 20:35:57 -05:00
pohmelfs
Documentation: Fix multiple typo in Documentation
2012-03-07 16:08:24 +01:00
00-INDEX
Documentation/filesystems/00-INDEX: updates
2014-01-23 16:37:01 -08:00
9p.txt
9p: update documentation
2014-01-24 10:55:21 -06:00
adfs.txt
adfs: add hexadecimal filetype suffix option
2011-03-22 17:44:17 -07:00
affs.txt
Documentation: update broken web addresses.
2010-08-04 15:21:40 +02:00
afs.txt
autofs4-mount-control.txt
Fix common misspellings
2011-03-31 11:26:23 -03:00
automount-support.txt
befs.txt
Documentation: befs.txt: no maintainer, orphaned
2011-08-13 18:34:03 -07:00
bfs.txt
remove mention of CONFIG_KMOD from documentation
2008-07-22 19:24:29 +10:00
btrfs.txt
Documentation: filesystems: update btrfs tools section
2013-11-21 11:51:50 -05:00
ceph.txt
ceph: enable/disable dentry complete flags via mount option
2012-01-12 11:00:40 -08:00
coda.txt
cramfs.txt
debugfs.txt
debugfs: more tightly restrict default mount mode
2012-08-27 13:42:02 -07:00
devpts.txt
directory-locking
vfs: take i_mutex on renamed file
2013-11-09 00:16:40 -05:00
dlmfs.txt
Documentation/: it's -> its where appropriate
2010-04-23 02:09:52 +02:00
dnotify.txt
Documentation/fs/: split txt and source files
2010-03-12 15:52:35 -08:00
dnotify_test.c
Documentation/fs/: split txt and source files
2010-03-12 15:52:35 -08:00
ecryptfs.txt
eCryptfs: Move ecryptfs docs into Documentation/filesystems/
2007-07-17 10:23:08 -07:00
efivarfs.txt
efivarfs: Add documentation for the EFI variable filesystem
2012-10-30 10:39:18 +00:00
exofs.txt
exofs: Add option to mount by osdname
2011-03-15 15:02:51 +02:00
ext2.txt
ext3.txt
ext3: allow specifying external journal by pathname mount option
2013-07-31 22:11:15 +02:00
ext4.txt
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
2013-09-06 09:36:28 -07:00
f2fs.txt
f2fs: update documents and a MAINTAINERS entry
2014-01-09 21:00:06 +09:00
fiemap.txt
Documentation/: it's -> its where appropriate
2010-04-23 02:09:52 +02:00
files.txt
Wrap accesses to the fd_sets in struct fdtable
2012-02-19 10:30:52 -08:00
fuse.txt
Documentation/: it's -> its where appropriate
2010-04-23 02:09:52 +02:00
gfs2-glocks.txt
GFS2: Update glock doc to add new stats info
2012-05-10 12:41:40 +01:00
gfs2-uevents.txt
Documentation: Fix multiple typo in Documentation
2012-03-07 16:08:24 +01:00
gfs2.txt
GFS2: Update main gfs2 doc
2012-05-10 11:45:31 +01:00
hfs.txt
Documentation: HFS is orphaned
2011-11-04 12:01:48 -07:00
hfsplus.txt
hpfs.txt
Documentation/: it's -> its where appropriate
2010-04-23 02:09:52 +02:00
inotify.txt
Documentation: fix inotify source file paths
2011-11-04 12:01:47 -07:00
isofs.txt
Documentation: update broken web addresses.
2010-08-04 15:21:40 +02:00
jfs.txt
doc: fix misspellings with 'codespell' tool
2013-05-28 12:02:12 +02:00
Locking
doc: Fix typo (acces_process_vm -> access_process_vm)
2013-12-19 15:12:21 +01:00
locks.txt
doc: fix broken references
2011-09-27 18:08:04 +02:00
logfs.txt
fix "seperate" typos in comments
2010-05-10 11:56:30 +02:00
Makefile
Documentation/fs/: split txt and source files
2010-03-12 15:52:35 -08:00
mandatory-locking.txt
ncpfs.txt
nilfs2.txt
nilfs2: add comments for ioctls
2014-01-23 16:37:00 -08:00
ntfs.txt
Fix common misspellings
2011-03-31 11:26:23 -03:00
ocfs2.txt
ocfs2: clean up mount option about atime in ocfs2.txt
2011-05-23 23:37:12 -07:00
omfs.txt
path-lookup.txt
Fix common misspellings
2011-03-31 11:26:23 -03:00
porting
iget/iget5: don't bother with ->i_lock until we find a match
2013-11-09 00:16:31 -05:00
proc.txt
mm, oom: base root bonus on current usage
2014-01-30 16:56:56 -08:00
qnx6.txt
doc: filesystems : Fix typo in Documentations/filesystems
2013-08-20 13:45:56 +02:00
quota.txt
ramfs-rootfs-initramfs.txt
initmpfs: use initramfs if rootfstype= or root= specified
2013-09-11 15:59:38 -07:00
relay.txt
doc: Fix typo in doucmentations
2013-07-25 12:34:15 +02:00
romfs.txt
Documentation/filesystems/romfs.txt: fixing link to genromfs
2011-02-17 22:04:46 +01:00
seq_file.txt
seq_file: use proc_create() in documentation
2009-12-16 07:20:07 -08:00
sharedsubtree.txt
Documentation: Fix trivial typo in filesystems/sharedsubtree.txt
2010-10-25 21:18:21 -04:00
spufs.txt
squashfs.txt
Squashfs: Update documentation to include xattrs
2011-12-30 01:20:24 +00:00
sysfs-pci.txt
PCI: Allow read/write access to sysfs I/O port resources
2010-07-30 09:32:08 -07:00
sysfs-tagging.txt
doc: Fix typo in doucmentations
2013-07-25 12:34:15 +02:00
sysfs.txt
Documentation/filesystems/sysfs.txt: fix device_attribute declaration
2014-01-23 16:37:00 -08:00
sysv-fs.txt
tmpfs.txt
mempolicy: document cpuset interaction with tmpfs mpol mount option
2010-05-25 08:06:57 -07:00
ubifs.txt
UBIFS: switch self-check knobs to debugfs
2011-07-04 10:54:28 +03:00
udf.txt
ufs.txt
vfat.txt
Documentation/filesystems/vfat.txt: fix directory entry example
2013-11-13 12:09:32 +09:00
vfs.txt
vfs: improve i_op->atomic_open() documentation
2013-09-16 19:17:24 -04:00
xfs-delayed-logging-design.txt
Fix common misspellings
2011-03-31 11:26:23 -03:00
xfs-self-describing-metadata.txt
xfs: add metadata CRC documentation
2013-04-27 13:27:43 -05:00
xfs.txt
doc: filesystems : Fix typo in Documentations/filesystems
2013-08-20 13:45:56 +02:00
xip.txt