]> 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>
Fri, 2 Dec 2011 03:15:30 +0000 (14:15 +1100)
commit90b7347bae44b1b94b04062c210ec6c7c2f74212
tree82fb67307538850ce43602edceacdf512182251b
parentff3dc8005255b318eea152dd2238a9dd5abc9b29
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