rmap don't test rss
Subsystems (2)
PATCH 1/1 rmap don't test rss
Remove the three get_mm_counter(mm, rss) tests from rmap.c: there was a time when testing rss was important to avoid a particular race between dup_mmap and the anonmm rmap; but now it's just a rather silly pseudo- optimization, made even more obscure by the get_mm_counter macro.
Signed-off-by Hugh Dickins <[email protected]>
---
mm/rmap.c | 7 +------ 1 files changed, 1 insertion(+), 6 deletions(-)
mm/rmap.c +1 -6
@@ -290,8 +290,6 @@ static int page_referenced_one(struct papte_t *pte;int referenced =0 ; -if (!get_mm_counter (mm, rss)) - goto out; address =vma_address (page, vma);if (address == -EFAULT ) goto out;
@@ -522,8 +520,6 @@ static int try_to_unmap_one(struct pagepte_t pteval;int ret =SWAP_AGAIN ; -if (!get_mm_counter (mm, rss)) - goto out; address =vma_address (page, vma);if (address == -EFAULT ) goto out;
@@ -771,8 +767,7 @@ static int try_to_unmap_file(struct pageif (vma->vm_flags & (VM_LOCKED |VM_RESERVED ))continue ; cursor = (unsigned long ) vma->vm_private_data; -while (get_mm_counter (vma->vm_mm, rss) && - cursor < max_nl_cursor && +while ( cursor < max_nl_cursor && cursor < vma->vm_end - vma->vm_start) {try_to_unmap_cluster (cursor, &mapcount, vma); cursor +=CLUSTER_SIZE ;