WSL2-Linux-Kernel/fs
David Rientjes a7f638f999 mm, oom: normalize oom scores to oom_score_adj scale only for userspace
The oom_score_adj scale ranges from -1000 to 1000 and represents the
proportion of memory available to the process at allocation time.  This
means an oom_score_adj value of 300, for example, will bias a process as
though it was using an extra 30.0% of available memory and a value of
-350 will discount 35.0% of available memory from its usage.

The oom killer badness heuristic also uses this scale to report the oom
score for each eligible process in determining the "best" process to
kill.  Thus, it can only differentiate each process's memory usage by
0.1% of system RAM.

On large systems, this can end up being a large amount of memory: 256MB
on 256GB systems, for example.

This can be fixed by having the badness heuristic to use the actual
memory usage in scoring threads and then normalizing it to the
oom_score_adj scale for userspace.  This results in better comparison
between eligible threads for kill and no change from the userspace
perspective.

Suggested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tested-by: Dave Jones <davej@redhat.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-29 16:22:24 -07:00
..
9p
adfs
affs
afs
autofs4 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
befs
bfs
btrfs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
cachefiles
ceph
cifs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
efs
exofs Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd 2012-05-28 13:10:41 -07:00
exportfs
ext2 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
ext3 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
ext4 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
fat
freevxfs
fscache
fuse avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
gfs2 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
hfs
hfsplus avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
hostfs
hpfs
hppfs
hugetlbfs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
isofs
jbd
jbd2
jffs2 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
jfs
lockd
logfs
minix
ncpfs
nfs NFS client updates for Linux 3.5 2012-05-29 10:43:51 -07:00
nfs_common
nfsd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
nilfs2 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
nls
notify
ntfs
ocfs2 avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
omfs
openpromfs
proc mm, oom: normalize oom scores to oom_score_adj scale only for userspace 2012-05-29 16:22:24 -07:00
pstore avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
qnx4
qnx6
quota
ramfs
reiserfs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
romfs
squashfs
sysfs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
sysv
ubifs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
udf avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
ufs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
xfs avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
bad_inode.c mm/fs: remove truncate_range 2012-05-29 16:22:23 -07:00
binfmt_aout.c
binfmt_elf.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
binfmt_elf_fdpic.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
dcache.c mm: add a low limit to alloc_large_system_hash 2012-05-24 00:28:21 -04:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
fcntl.c
fhandle.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
fs_struct.c
generic_acl.c
inode.c avoid iput() from flusher thread 2012-05-28 09:54:45 -07:00
internal.h
ioctl.c
ioprio.c
libfs.c
locks.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
mbcache.c
mount.h
mpage.c
namei.c word-at-a-time: make the interfaces truly generic 2012-05-26 11:33:40 -07:00
namespace.c
no-block.c
open.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2012-05-23 17:42:39 -07:00
statfs.c
super.c
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c