lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/9] kstaled: rate limit pages scanned per second.
On Wed, 28 Sep 2011 01:19:50 -0700
Michel Lespinasse <walken@google.com> wrote:

> On Wed, Sep 28, 2011 at 1:13 AM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > On Tue, 27 Sep 2011 17:49:04 -0700
> > Michel Lespinasse <walken@google.com> wrote:
> >
> >> Scan some number of pages from each node every second, instead of trying to
> >> scan the entime memory at once and being idle for the rest of the configured
> >> interval.
> >>
> >> In addition to spreading the CPU usage over the entire scanning interval,
> >> this also reduces the jitter between two consecutive scans of the same page.
> >>
> >>
> >> Signed-off-by: Michel Lespinasse <walken@google.com>
> >
> > Does this scan thread need to be signle thread ?
>
> It tends to perform worse if we try making it multithreaded. What
> happens is that the scanning threads call page_referenced() a lot, and
> if they both try scanning pages that belong to the same file that
> causes the mapping's i_mmap_mutex lock to bounce. Same things happens
> if they try scanning pages that belong to the same anon VMA too.
>

Hmm. with brief thinking, if you can scan list of page tables,
you can set young flags without any locks.
For inode pages, you can hook page lookup, I think.

You only need to clear Young flag by scanning [pfn, end_pfn].
Then, multi-threaded. ?


Thanks,
-Kame





\
 
 \ /
  Last update: 2011-09-28 11:03    [W:0.966 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site