Re: [BENCHMARKS] Namesys VM patches improve kbuild

Nikita Danilov
2004-01-26T12:14:25Z

Nick Piggin writes:
>
>
> Nikita Danilov wrote:
>
> >Nick Piggin writes:
> > >
> >
> >[...]
> >
> > >
> > > But by clearing the referenced bit when below the reclaim_mapped
> > > threshold, you're throwing this information away.
> > >
> > > Say you have 16 mapped pages on the active list, 8 referenced, 8 not.
> > > You do a !reclaim_mapped scan. Your 16 pages are now in the same
> > > order and none are referenced. You now do a reclaim_mapped scan and
> > > reclaim 8 pages. 4 of them were the referenced ones, 4 were not.
> > >
> > > With my change, you would reclaim all 8 non referenced pages.
> >
> >Which is wrong, because none of them was referenced _recently_. These
> >pages are cold, according to the VM's notion of hotness. (Long time
> >probably has passed between !reclaim_mapped and reclaim_mapped scans in
> >your example.)
> >
>
> Well you'd have to admit the referenced pages are hotter, but
> I guess I can't argue with the numbers: it must not be very
> significant.
>
> I just wonder why your patch makes such an improvement. You're
> basically putting mapped pages to one side until reclaim_mapped,
> which is similar to what my patch does, right?

Difference is that dont-rotate-active-list leaves mapped pages behind
the scanning point, in stead of moving them to the head of the active
list. Moving these pages to the head of the active list destroys LRU
approximation for the file system cache (see mark_page_accessed()): in
LRU, a page is moved to the head of the queue when accessed and later
migrates through the queue because other _hotter_ pages are added to the
head of the queue. But in the un-patched VM a page migrates through the
queue, because:

(1) other hotter pages are added to the head of the queue.

(2) other possibly _colder_ mapped pages are added to the head of the
queue.

(2) is obviously bad for the LRU approximation, and
dont-rotate-active-list patch gets rid of it.

>
>

Nikita.