lkml.org 
[lkml]   [2010]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] RFC: vmscan: add min_filelist_kbytes sysctl for protecting the working set
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...



\
 
 \ /
  Last update: 2010-10-28 23:35    [W:1.545 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site