]> git.baikalelectronics.ru Git - kernel.git/commit
swap_info: note SWAP_MAP_SHMEM
authorHugh Dickins <hugh.dickins@tiscali.co.uk>
Tue, 15 Dec 2009 01:58:47 +0000 (17:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:16 +0000 (08:53 -0800)
commit4f377d840575d7b64135925e210e4880a1e1dd9f
tree3cb8c9232dd405001fa38d5519937c5e6c6f32ab
parent069e1a20af922f22c09e7b51efcfafcb8f5edce0
swap_info: note SWAP_MAP_SHMEM

While we're fiddling with the swap_map values, let's assign a particular
value to shmem/tmpfs swap pages: their swap counts are never incremented,
and it helps swapoff's try_to_unuse() a little if it can immediately
distinguish those pages from process pages.

Since we've no use for SWAP_MAP_BAD | COUNT_CONTINUED,
we might as well use that 0xbf value for SWAP_MAP_SHMEM.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swap.h
mm/shmem.c
mm/swapfile.c