On Sun, 2005-06-26 at 18:35 -0400, Rik Van Riel wrote:
<snip>
This patch should have the effect of automatically, and gradually,
disabling the enforcement of the swap token when there is little
or no paging going on, and "turning up" the intensity of the swap
token code the more the task holding the token is thrashing.
Thanks to Song Jiang for pointing out this aspect of the token
based thrashing control concept.
Signed-off-by: Rik van Riel
<snip>
I might be missing something here, but shouldn't this rather be:
quoted hunk ↗ jump to hunk
--- 2.6.12-swaptoken/mm/rmap.c.orig 2005-06-26 17:16:50.000000000 -0400
+++ 2.6.12-swaptoken/mm/rmap.c 2005-06-26 17:13:17.000000000 -0400
@@ -301,7 +301,11 @@ static int page_referenced_one(struct pa
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) &&
-+ sem_is_read_locked(mm->mmap_sem))
+ sem_is_read_locked(&mm->mmap_sem))
As mm is a pointer, but mm->mmap_sem is not a pointer? This is with
2.6.12-mm2 though ...
Thanks,
--
Martin Schlemmer