diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-07-24 04:47:59 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-07-24 04:48:00 -0400 |
commit | 50a15981a1fac7e019ff7c3cba87531fb580f065 (patch) | |
tree | 320ff80a5a01ae6936ac0a83cffb99e1f50adccf /mm/rmap.c | |
parent | f433c4aec9999d1bf2ed8c328196f3b0ad5f75db (diff) |
[S390] reference bit testing for unmapped pages
On x86 a page without a mapper is by definition not referenced / old.
The s390 architecture keeps the reference bit in the storage key and
the current code will check the storage key for page without a mapper.
This leads to an interesting effect: the first time an s390 system
needs to write pages to swap it only finds referenced pages. This
causes a lot of pages to get added and written to the swap device.
To avoid this behaviour change page_referenced to query the storage
key only if there is a mapper of the page.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -869,11 +869,11 @@ int page_referenced(struct page *page, | |||
869 | vm_flags); | 869 | vm_flags); |
870 | if (we_locked) | 870 | if (we_locked) |
871 | unlock_page(page); | 871 | unlock_page(page); |
872 | |||
873 | if (page_test_and_clear_young(page_to_pfn(page))) | ||
874 | referenced++; | ||
872 | } | 875 | } |
873 | out: | 876 | out: |
874 | if (page_test_and_clear_young(page_to_pfn(page))) | ||
875 | referenced++; | ||
876 | |||
877 | return referenced; | 877 | return referenced; |
878 | } | 878 | } |
879 | 879 | ||