diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2010-03-05 13:42:21 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 11:26:27 -0800 |
commit | 31c0569c3b0b6cc8a867ac6665ca081553f7984c (patch) | |
tree | c3d3e02f941fed0f91981d55d93540d2acaaecbd /virt/kvm | |
parent | dfc8d636cdb95f7b792d5ba8c9f3b295809c125d (diff) | |
download | op-kernel-dev-31c0569c3b0b6cc8a867ac6665ca081553f7984c.zip op-kernel-dev-31c0569c3b0b6cc8a867ac6665ca081553f7984c.tar.gz |
vmscan: drop page_mapping_inuse()
page_mapping_inuse() is a historic predicate function for pages that are
about to be reclaimed or deactivated.
According to it, a page is in use when it is mapped into page tables OR
part of swap cache OR backing an mmapped file.
This function is used in combination with page_referenced(), which checks
for young bits in ptes and the page descriptor itself for the
PG_referenced bit. Thus, checking for unmapped swap cache pages is
meaningless as PG_referenced is not set for anonymous pages and unmapped
pages do not have young ptes. The test makes no difference.
Protecting file pages that are not by themselves mapped but are part of a
mapped file is also a historic leftover for short-lived things like the
exec() code in libc. However, the VM now does reference accounting and
activation of pages at unmap time and thus the special treatment on
reclaim is obsolete.
This patch drops page_mapping_inuse() and switches the two callsites to
use page_mapped() directly.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: OSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions