linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: 20101025094235.9154.A69D9226@jp.fujitsu.com
Cc: Mandeep Singh Baines <msb@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Mel Gorman <mel@csn.ul.ie>, Minchan Kim <minchan.kim@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	wad@chromium.org, olofj@chromium.org, hughd@chromium.org
Subject: Re: [PATCH] RFC: vmscan: add min_filelist_kbytes sysctl for protecting the working set
Date: Thu, 28 Oct 2010 17:30:44 -0400	[thread overview]
Message-ID: <4CC9EB84.9050406@redhat.com> (raw)
In-Reply-To: <20101028191523.GA14972@google.com>

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2010-10-28 21:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 19:15 [PATCH] RFC: vmscan: add min_filelist_kbytes sysctl for protecting the working set Mandeep Singh Baines
2010-10-28 20:10 ` Andrew Morton
2010-10-28 22:03   ` Mandeep Singh Baines
2010-10-28 23:28     ` Minchan Kim
2010-10-28 23:29       ` Minchan Kim
2010-10-29  0:04       ` KAMEZAWA Hiroyuki
2010-10-29  0:28         ` Minchan Kim
2010-10-28 21:30 ` Rik van Riel [this message]
2010-10-28 22:13   ` Mandeep Singh Baines
2010-11-01  7:05 ` KOSAKI Motohiro
2010-11-01 18:24   ` Mandeep Singh Baines
2010-11-01 18:50     ` Rik van Riel
2010-11-01 19:43       ` Mandeep Singh Baines
2010-11-02  3:11         ` Rik van Riel
2010-11-03  0:48           ` Minchan Kim
2010-11-03  2:00             ` Rik van Riel
2010-11-03  3:03               ` Minchan Kim
2010-11-03 11:41                 ` Rik van Riel
2010-11-03 15:42                   ` Minchan Kim
2010-11-03 22:40           ` Mandeep Singh Baines
2010-11-03 23:49             ` Minchan Kim
2010-11-04 15:30             ` Rik van Riel
2010-11-08 21:55               ` Mandeep Singh Baines
2010-11-09  2:49               ` KOSAKI Motohiro
2010-11-01 23:46     ` Minchan Kim
2010-11-04  1:52       ` Mandeep Singh Baines
2010-11-05  2:36         ` Minchan Kim
2010-11-09  2:53         ` KOSAKI Motohiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC9EB84.9050406@redhat.com \
    --to=riel@redhat.com \
    --cc=20101025094235.9154.A69D9226@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@chromium.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=msb@chromium.org \
    --cc=olofj@chromium.org \
    --cc=wad@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).