diff options
author | Hugh Dickins <hughd@google.com> | 2012-10-08 19:33:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:55 -0400 |
commit | 39b5f29ac1f988c1615fbc9c69f6651ab0d0c3c7 (patch) | |
tree | d8030f58d542bb3e811d83676b38c5b4b3a16c02 /Documentation/vm/unevictable-lru.txt | |
parent | ec4d9f626d5908b6052c2973f37992f1db52e967 (diff) |
mm: remove vma arg from page_evictable
page_evictable(page, vma) is an irritant: almost all its callers pass
NULL for vma. Remove the vma arg and use mlocked_vma_newpage(vma, page)
explicitly in the couple of places it's needed. But in those places we
don't even need page_evictable() itself! They're dealing with a freshly
allocated anonymous page, which has no "mapping" and cannot be mlocked yet.
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michel Lespinasse <walken@google.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/vm/unevictable-lru.txt')
-rw-r--r-- | Documentation/vm/unevictable-lru.txt | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt index 323ff5dba1cc..a68db7692ee8 100644 --- a/Documentation/vm/unevictable-lru.txt +++ b/Documentation/vm/unevictable-lru.txt | |||
@@ -197,12 +197,8 @@ the pages are also "rescued" from the unevictable list in the process of | |||
197 | freeing them. | 197 | freeing them. |
198 | 198 | ||
199 | page_evictable() also checks for mlocked pages by testing an additional page | 199 | page_evictable() also checks for mlocked pages by testing an additional page |
200 | flag, PG_mlocked (as wrapped by PageMlocked()). If the page is NOT mlocked, | 200 | flag, PG_mlocked (as wrapped by PageMlocked()), which is set when a page is |
201 | and a non-NULL VMA is supplied, page_evictable() will check whether the VMA is | 201 | faulted into a VM_LOCKED vma, or found in a vma being VM_LOCKED. |
202 | VM_LOCKED via is_mlocked_vma(). is_mlocked_vma() will SetPageMlocked() and | ||
203 | update the appropriate statistics if the vma is VM_LOCKED. This method allows | ||
204 | efficient "culling" of pages in the fault path that are being faulted in to | ||
205 | VM_LOCKED VMAs. | ||
206 | 202 | ||
207 | 203 | ||
208 | VMSCAN'S HANDLING OF UNEVICTABLE PAGES | 204 | VMSCAN'S HANDLING OF UNEVICTABLE PAGES |
@@ -651,7 +647,7 @@ PAGE RECLAIM IN shrink_*_list() | |||
651 | ------------------------------- | 647 | ------------------------------- |
652 | 648 | ||
653 | shrink_active_list() culls any obviously unevictable pages - i.e. | 649 | shrink_active_list() culls any obviously unevictable pages - i.e. |
654 | !page_evictable(page, NULL) - diverting these to the unevictable list. | 650 | !page_evictable(page) - diverting these to the unevictable list. |
655 | However, shrink_active_list() only sees unevictable pages that made it onto the | 651 | However, shrink_active_list() only sees unevictable pages that made it onto the |
656 | active/inactive lru lists. Note that these pages do not have PageUnevictable | 652 | active/inactive lru lists. Note that these pages do not have PageUnevictable |
657 | set - otherwise they would be on the unevictable list and shrink_active_list | 653 | set - otherwise they would be on the unevictable list and shrink_active_list |