]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ksm: fix mlockfreed to munlocked
authorHugh Dickins <hugh.dickins@tiscali.co.uk>
Wed, 30 Dec 2009 23:00:30 +0000 (23:00 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 23:05:22 +0000 (15:05 -0800)
commit8ac9e802007e99534ec66af850ef7b099df27499
treefde720a1f13b82f58f10edd51d583eb293e305e6
parentb2ea8cb9c8f1937cb80b9beb50548a05bfc37819
ksm: fix mlockfreed to munlocked

2.6.33-rc1 commit 73848b4684e84a84cfd1555af78d41158f31e16b, adjusted
to include 31e855ea7173bdb0520f9684580423a9560f66e0's movement of
the unlock_page(oldpage), but omit other intervening cleanups.

When KSM merges an mlocked page, it has been forgetting to munlock it:
that's been left to free_page_mlock(), which reports it in /proc/vmstat
as unevictable_pgs_mlockfreed instead of unevictable_pgs_munlocked,
which indicates that such pages _might_ be left unevictable for long
after they should be evictable.  Call munlock_vma_page() to fix that.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/internal.h
mm/ksm.c
mm/mlock.c