]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix page-faults detection in swap-token logic
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Wed, 5 Oct 2011 00:43:07 +0000 (11:43 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Oct 2011 07:50:46 +0000 (18:50 +1100)
commitb05d1932f7b05023f0386291ee28e8173ed2d367
treeb3447f084e154df66489724ffe5144c2a792f798
parent441373aad88db3e7d0938cf1c0d5609c7a1ec32a
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