]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Disable the toy swapping implementation in shmem_writepage() - it's hard
authorHugh Dickins <hughd@google.com>
Tue, 26 Jul 2011 10:14:53 +0000 (20:14 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 29 Jul 2011 05:53:05 +0000 (15:53 +1000)
commit6bf384bdb863a0cfa5ab44deecb786607b7ca680
tree8fdc3f094fe17058140744abda67a9fe78988c63
parent84249001e41698ccc6a164fc54a50b67b7f463a4
Disable the toy swapping implementation in shmem_writepage() - it's hard
to support two schemes at once - and convert shmem_truncate_range() to a
lockless gang lookup of swap entries along with pages, freeing both.

Since the second loop tightens its noose until all entries of either kind
have been squeezed out (and we shall make sure that there's not an instant
when neither is visible), there is no longer a need for yet another pass
below.

shmem_radix_tree_replace() compensates for the lockless lookup by checking
that the expected entry is in place, under lock, before replacing it.
Here it just deletes, but will be used in later patches to substitute swap
entry for page or page for swap entry.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c