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: > --- 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
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- Re: [PATCH] 2/2 swap token tuning
- From: Rik Van Riel <[email protected]>
- Re: [PATCH] 2/2 swap token tuning
- References:
- [PATCH] 0/2 swap token tuning
- From: Rik Van Riel <[email protected]>
- [PATCH] 2/2 swap token tuning
- From: Rik Van Riel <[email protected]>
- [PATCH] 0/2 swap token tuning
- Prev by Date: Re: 2.6.12 USB Keypad still not working
- Next by Date: RE: [ltp] IBM HDAPS Someone interested? (Accelerometer)
- Previous by thread: [PATCH] 2/2 swap token tuning
- Next by thread: Re: [PATCH] 2/2 swap token tuning
- Index(es):