Re: [PATCH]vmscan: handle underflow for get_scan_ratio

Wu Fengguang
2010-04-06T01:22:16Z

> ===================================================================
> >From 52358cbccdfe94e0381974cd6e937bcc6b1c608b Mon Sep 17 00:00:00 2001
> From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Date: Fri, 2 Apr 2010 17:13:48 +0900
> Subject: [PATCH] Revert "vmscan: get_scan_ratio() cleanup"
>
> Shaohua Li reported his tmpfs streaming I/O test can lead to make oom.
> The test uses a 6G tmpfs in a system with 3G memory. In the tmpfs,
> there are 6 copies of kernel source and the test does kbuild for each
> copy. His investigation shows the test has a lot of rotated anon
> pages and quite few file pages, so get_scan_ratio calculates percent[0]
> (i.e. scanning percent for anon) to be zero. Actually the percent[0]
> shoule be a big value, but our calculation round it to zero.

should small :)

Acked-by: Wu Fengguang <fengguang.wu@intel.com>

Thanks,
Fengguang