On Tue, Apr 06, 2010 at 10:58:43AM +0800, KOSAKI Motohiro wrote:Again, I didn't said his patch is no worth. I only said we don't have to
ignore the downside.
Right, we should document both the upside and downside.
The main difference happens when file:anon scan ratio> 100:1.
For the current percent based computing, percent=0 hence nr=0
which disables anon list scan unconditionally, for good or for bad.
For the direct nr computing,
- nr will be 0 for typical file servers, because with priority=12
and anon lru size< 1.6GB, nr = (anon_size/4096)/100< 0
- nr will be non-zero when priority=1 and anon_size> 100 pages,
this stops OOM for Shaohua's test case, however may not be enough to
guarantee safety (your previous reverting patch can provide this
I liked Shaohua's patch a lot -- it adapts well to both the
file-server case and the mostly-anon-pages case :)