]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix page-faults detection in swap-token logic
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Fri, 2 Dec 2011 03:11:38 +0000 (14:11 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 6 Dec 2011 03:59:21 +0000 (14:59 +1100)
commitfe5898688f32efbf88f7221295b9cb7d5149c92b
treea3da72c446724ad9fcd9bf0931250509036d0474
parenta03ebdd34895a3a449690a389c9f803ec92a0861
mm: fix page-faults detection in swap-token logic

After commit v2.6.36-5896-gd065bd8 "mm: retry page fault when blocking on
disk transfer" we usually wait in page-faults without mmap_sem held, so
all swap-token logic was broken, because it based on using
rwsem_is_locked(&mm->mmap_sem) as sign of in progress page-faults.

Add an atomic counter of in progress page-faults for mm to the mm_struct
with swap-token.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm_types.h
include/linux/swap.h
kernel/fork.c
mm/memory.c
mm/rmap.c