diff --git a/[refs] b/[refs] index 2b8ebecd6e57..5a56534a94ee 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eb92f4ef320b738e41ad43476a5d05c8a20d5cc7 +refs/heads/master: fcdae29aa7a5c79f245110f6680afdc1858d3626 diff --git a/trunk/mm/rmap.c b/trunk/mm/rmap.c index 450f5241b5a5..1fc559e09ca8 100644 --- a/trunk/mm/rmap.c +++ b/trunk/mm/rmap.c @@ -298,7 +298,11 @@ static int page_referenced_one(struct page *page, if (ptep_clear_flush_young(vma, address, pte)) referenced++; - if (mm != current->mm && !ignore_token && has_swap_token(mm)) + /* Pretend the page is referenced if the task has the + swap token and is in the middle of a page fault. */ + if (mm != current->mm && !ignore_token && + has_swap_token(mm) && + rwsem_is_locked(&mm->mmap_sem)) referenced++; (*mapcount)--; diff --git a/trunk/mm/thrash.c b/trunk/mm/thrash.c index 11461f7ad830..eff3c18c33a1 100644 --- a/trunk/mm/thrash.c +++ b/trunk/mm/thrash.c @@ -19,7 +19,7 @@ static unsigned long swap_token_check; struct mm_struct * swap_token_mm = &init_mm; #define SWAP_TOKEN_CHECK_INTERVAL (HZ * 2) -#define SWAP_TOKEN_TIMEOUT 0 +#define SWAP_TOKEN_TIMEOUT (300 * HZ) /* * Currently disabled; Needs further code to work at HZ * 300. */