[PATCH] 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 <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Родитель
3279ffd97f
Коммит
839b9685e8
|
@ -289,8 +289,6 @@ static int page_referenced_one(struct page *page,
|
||||||
pte_t *pte;
|
pte_t *pte;
|
||||||
int referenced = 0;
|
int referenced = 0;
|
||||||
|
|
||||||
if (!get_mm_counter(mm, rss))
|
|
||||||
goto out;
|
|
||||||
address = vma_address(page, vma);
|
address = vma_address(page, vma);
|
||||||
if (address == -EFAULT)
|
if (address == -EFAULT)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -517,8 +515,6 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma)
|
||||||
pte_t pteval;
|
pte_t pteval;
|
||||||
int ret = SWAP_AGAIN;
|
int ret = SWAP_AGAIN;
|
||||||
|
|
||||||
if (!get_mm_counter(mm, rss))
|
|
||||||
goto out;
|
|
||||||
address = vma_address(page, vma);
|
address = vma_address(page, vma);
|
||||||
if (address == -EFAULT)
|
if (address == -EFAULT)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -766,8 +762,7 @@ static int try_to_unmap_file(struct page *page)
|
||||||
if (vma->vm_flags & (VM_LOCKED|VM_RESERVED))
|
if (vma->vm_flags & (VM_LOCKED|VM_RESERVED))
|
||||||
continue;
|
continue;
|
||||||
cursor = (unsigned long) vma->vm_private_data;
|
cursor = (unsigned long) vma->vm_private_data;
|
||||||
while (get_mm_counter(vma->vm_mm, rss) &&
|
while ( cursor < max_nl_cursor &&
|
||||||
cursor < max_nl_cursor &&
|
|
||||||
cursor < vma->vm_end - vma->vm_start) {
|
cursor < vma->vm_end - vma->vm_start) {
|
||||||
try_to_unmap_cluster(cursor, &mapcount, vma);
|
try_to_unmap_cluster(cursor, &mapcount, vma);
|
||||||
cursor += CLUSTER_SIZE;
|
cursor += CLUSTER_SIZE;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче