]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: fix page-faults detection in swap-token logic
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Tue, 8 Nov 2011 00:20:14 +0000 (11:20 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 9 Nov 2011 02:10:17 +0000 (13:10 +1100)
commit9e9b34584ea43e70c2ea37b65f33ad514a672df3
tree24153c675f4ef3c19120a1b71944419b655f4111
parent2800ee3e1689cebf37e768fb1b3627c7b36ed19d
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