aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/rmap.c6
-rw-r--r--mm/thrash.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 450f5241b5a5..1fc559e09ca8 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -298,7 +298,11 @@ static int page_referenced_one(struct page *page,
298 if (ptep_clear_flush_young(vma, address, pte)) 298 if (ptep_clear_flush_young(vma, address, pte))
299 referenced++; 299 referenced++;
300 300
301 if (mm != current->mm && !ignore_token && has_swap_token(mm)) 301 /* Pretend the page is referenced if the task has the
302 swap token and is in the middle of a page fault. */
303 if (mm != current->mm && !ignore_token &&
304 has_swap_token(mm) &&
305 rwsem_is_locked(&mm->mmap_sem))
302 referenced++; 306 referenced++;
303 307
304 (*mapcount)--; 308 (*mapcount)--;
diff --git a/mm/thrash.c b/mm/thrash.c
index 11461f7ad830..eff3c18c33a1 100644
--- a/mm/thrash.c
+++ b/mm/thrash.c
@@ -19,7 +19,7 @@ static unsigned long swap_token_check;
19struct mm_struct * swap_token_mm = &init_mm; 19struct mm_struct * swap_token_mm = &init_mm;
20 20
21#define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2) 21#define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2)
22#define SWAP_TOKEN_TIMEOUT 0 22#define SWAP_TOKEN_TIMEOUT (300 * HZ)
23/* 23/*
24 * Currently disabled; Needs further code to work at HZ * 300. 24 * Currently disabled; Needs further code to work at HZ * 300.
25 */ 25 */