https://github.com/torvalds/linux
Revision c702418f8a2fa6cc92e84a39880d458faf7af9cc authored by Johannes Weiner on 04 December 2012, 16:11:31 UTC, committed by Linus Torvalds on 06 December 2012, 19:29:57 UTC
When a zone meets its high watermark and is compactable in case of
higher order allocations, it contributes to the percentage of the node's
memory that is considered balanced.

This requirement, that a node be only partially balanced, came about
when kswapd was desparately trying to balance tiny zones when all bigger
zones in the node had plenty of free memory.  Arguably, the same should
apply to compaction: if a significant part of the node is balanced
enough to run compaction, do not get hung up on that tiny zone that
might never get in shape.

When the compaction logic in kswapd is reached, we know that at least
25% of the node's memory is balanced properly for compaction (see
zone_balanced and pgdat_balanced).  Remove the individual zone checks
that restart the kswapd cycle.

Otherwise, we may observe more endless looping in kswapd where the
compaction code loops back to reclaim because of a single zone and
reclaim does nothing because the node is considered balanced overall.

See for example

  https://bugzilla.redhat.com/show_bug.cgi?id=866988

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-and-tested-by: Thorsten Leemhuis <fedora@leemhuis.info>
Reported-by: Jiri Slaby <jslaby@suse.cz>
Tested-by: John Ellson <john.ellson@comcast.net>
Tested-by: Zdenek Kabelac <zkabelac@redhat.com>
Tested-by: Bruno Wolff III <bruno@wolff.to>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 60177d3
History
Tip revision: c702418f8a2fa6cc92e84a39880d458faf7af9cc authored by Johannes Weiner on 04 December 2012, 16:11:31 UTC
mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones
Tip revision: c702418
File Mode Size
9p
adfs
affs
afs
autofs4
befs
bfs
btrfs
cachefiles
ceph
cifs
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exofs
exportfs
ext2
ext3
ext4
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
Kconfig -rw-r--r-- 6.2 KB
Kconfig.binfmt -rw-r--r-- 6.7 KB
Makefile -rw-r--r-- 4.1 KB
aio.c -rw-r--r-- 45.7 KB
anon_inodes.c -rw-r--r-- 6.4 KB
attr.c -rw-r--r-- 7.0 KB
bad_inode.c -rw-r--r-- 7.7 KB
binfmt_aout.c -rw-r--r-- 11.8 KB
binfmt_elf.c -rw-r--r-- 57.7 KB
binfmt_elf_fdpic.c -rw-r--r-- 48.5 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 26.7 KB
binfmt_misc.c -rw-r--r-- 15.1 KB
binfmt_script.c -rw-r--r-- 2.8 KB
binfmt_som.c -rw-r--r-- 7.1 KB
bio-integrity.c -rw-r--r-- 20.5 KB
bio.c -rw-r--r-- 40.2 KB
block_dev.c -rw-r--r-- 41.5 KB
buffer.c -rw-r--r-- 87.1 KB
char_dev.c -rw-r--r-- 14.0 KB
compat.c -rw-r--r-- 44.7 KB
compat_binfmt_elf.c -rw-r--r-- 3.6 KB
compat_ioctl.c -rw-r--r-- 45.4 KB
coredump.c -rw-r--r-- 16.5 KB
coredump.h -rw-r--r-- 106 bytes
dcache.c -rw-r--r-- 80.5 KB
dcookies.c -rw-r--r-- 6.8 KB
direct-io.c -rw-r--r-- 37.4 KB
drop_caches.c -rw-r--r-- 1.5 KB
eventfd.c -rw-r--r-- 10.9 KB
eventpoll.c -rw-r--r-- 53.3 KB
exec.c -rw-r--r-- 39.4 KB
fcntl.c -rw-r--r-- 16.3 KB
fhandle.c -rw-r--r-- 6.4 KB
fifo.c -rw-r--r-- 3.2 KB
file.c -rw-r--r-- 23.6 KB
file_table.c -rw-r--r-- 12.2 KB
filesystems.c -rw-r--r-- 6.4 KB
fs-writeback.c -rw-r--r-- 39.4 KB
fs_struct.c -rw-r--r-- 3.6 KB
generic_acl.c -rw-r--r-- 3.9 KB
inode.c -rw-r--r-- 48.7 KB
internal.h -rw-r--r-- 3.0 KB
ioctl.c -rw-r--r-- 15.6 KB
ioprio.c -rw-r--r-- 5.0 KB
libfs.c -rw-r--r-- 25.8 KB
locks.c -rw-r--r-- 58.7 KB
mbcache.c -rw-r--r-- 16.4 KB
mount.h -rw-r--r-- 2.2 KB
mpage.c -rw-r--r-- 20.0 KB
namei.c -rw-r--r-- 99.0 KB
namespace.c -rw-r--r-- 64.8 KB
no-block.c -rw-r--r-- 688 bytes
open.c -rw-r--r-- 24.3 KB
pipe.c -rw-r--r-- 28.9 KB
pnode.c -rw-r--r-- 8.8 KB
pnode.h -rw-r--r-- 1.4 KB
posix_acl.c -rw-r--r-- 9.2 KB
proc_namespace.c -rw-r--r-- 7.5 KB
read_write.c -rw-r--r-- 21.6 KB
read_write.h -rw-r--r-- 632 bytes
readdir.c -rw-r--r-- 6.8 KB
select.c -rw-r--r-- 24.0 KB
seq_file.c -rw-r--r-- 19.6 KB
signalfd.c -rw-r--r-- 8.0 KB
splice.c -rw-r--r-- 46.4 KB
stack.c -rw-r--r-- 2.5 KB
stat.c -rw-r--r-- 11.1 KB
statfs.c -rw-r--r-- 5.2 KB
super.c -rw-r--r-- 34.6 KB
sync.c -rw-r--r-- 10.6 KB
timerfd.c -rw-r--r-- 8.5 KB
utimes.c -rw-r--r-- 5.6 KB
xattr.c -rw-r--r-- 22.3 KB
xattr_acl.c -rw-r--r-- 4.3 KB

back to top