Re: [PATCH] vmscan: fix get_scan_ratio comment

From: Rik van Riel
Date: Mon Nov 17 2008 - 13:54:57 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/