lkml.org 
[lkml]   [2008]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: evict streaming IO cache first
Linus Torvalds wrote:

> Another thing strikes me: it looks like the logic in "get_scan_ratio()"
> has a tendency to get unbalanced - if we end up deciding that we should
> scan a lot of anonymous pages, the scan numbers for anonymous pages will
> go up, and we get even _more_ eager to scan those. Of course, "rotate"
> events will then make us less likely again, but for streaming loads, you
> wouldn't expect to see those at all.

True for streaming loads - if we scan the file list and find
mostly pages from streaming loads, we will become more eager
to scan the file list.

I do not expect streaming loads to ever hit the anon list in
the same way, because anonymous pages start out referenced and
on the active list, which means an anonymous deactivation will
always be counted as a rotate event.

> There seems to be another bug there wrt the "aging" - we age anon page
> events and file page events independently, which sounds like it would make
> the math totally nonsensical. We do that whole
>
> anon / (anon + file)

That's an outdated comment. Andrew had a patch to update that
comment, but it must have gotten lost somewhere. I'll send you
a patch to update it.

If you look at the actual calculation, you'l see that the
scan percentages are keyed off just swappiness and the
rotated/scanned ratios for each page category.

--
All rights reversed.


\
 
 \ /
  Last update: 2008-11-17 17:57    [W:0.467 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site