Re: [PATCH] vmscan: fix get_scan_ratio comment

Rik van Riel
2008-11-17T18:54:57Z

Linus Torvalds wrote:

> Anyway, without quoting, the thing is - your fix isn't any better. The
> more interesting part is how the fractions get combined, and that is
> indeed approximately "anon% = anon / (anon + file)".

Well, the "anon" and "file" in that calculation are the
scanned/rotated ratios for anon and file pages, not the
sizes of the lists.

> So you in many ways made the comment worse. It wasn't good before, but
> it's still not good, and now it comments on the part that isn't even
> interesting (ie it comments the _trivial_ fractional part)

How about something like the following: ?

/*
* The amount of pressure on anon vs file pages is inversely
* proportional to the fraction of recently scanned pages on
* each list that were recently referenced and in active use.
*/

(I'll mail the next patches out with claws-mail - silly thunderbird)

--
All rights reversed.