On 10/28/2010 03:15 PM, Mandeep Singh Baines wrote:
+/* + * Check low watermark used to prevent fscache thrashing during low memory. + */ +static int file_is_low(struct zone *zone, struct scan_control *sc) +{ + unsigned long pages_min, active, inactive; + + if (!scanning_global_lru(sc)) + return false; + + pages_min = min_filelist_kbytes>> (PAGE_SHIFT - 10); + active = zone_page_state(zone, NR_ACTIVE_FILE); + inactive = zone_page_state(zone, NR_INACTIVE_FILE); + + return ((active + inactive)< pages_min); +}
This is problematic. It is quite possible for a NUMA system to have one zone legitimately low on page cache (because all the binaries and libraries got paged in on another NUMA node), without the system being anywhere near out of memory. This patch looks like it could cause a false OOM kill in that scenario. At the very minimum, you'd have to check that the system is low on page cache globally, not just locally. You do point out a real problem though, and it would be nice to find a generic solution to it... -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>