]> git.kernelconcepts.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>
Tue, 2 Aug 2011 05:14:25 +0000 (15:14 +1000)
commite2038d9ca3c1b60c5c410819e2a8e311cc5e8c37
tree63338b1240b620d920d26afbefe89b692ffeacdd
parentb7f9ff33c72609e05bf7a60a93efb42fde8da3e0
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