From: Nick Piggin <npiggin@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: Ying Han <yinghan@google.com>, Michal Hocko <mhocko@suse.cz>,
Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mel@csn.ul.ie>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Hugh Dickins <hughd@google.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [RFC PATCH] do_try_to_free_pages() might enter infinite loop
Date: Wed, 2 May 2012 13:25:25 +1000 [thread overview]
Message-ID: <CAPa8GCC8YxQ9Z9y3QJprn_MeAUs4XqKi3DLZHpbUVGJbGp2Rpw@mail.gmail.com> (raw)
In-Reply-To: <4FA017FA.2000707@redhat.com>
On 2 May 2012 03:06, Rik van Riel <riel@redhat.com> wrote:
> On 05/01/2012 12:18 PM, Ying Han wrote:
>
>> The current logic seems perfer to reclaim more than going oom kill,
>> and that might not fit all user's expectation. However, I guess it is
>> hard to convince for any changes since different users has different
>> bias as you said....
>
>
> However, it is a sure thing that desktop users and smartphone
> users do want an earlier OOM kill.
>
> I wonder if doing an OOM kill when the number of free pages
> plus the number of file lru pages in every zone is below
> pages_high and there is no more swap available might work?
This patch in the first place was required to even reach the
condition that "no more swap is available" on this virtual
machine server workload I was vaguely remembering.
Without this logic, it would be OOM killed before such condition
is hit, because we can require to go around the LRU a few times
to free enough pages. You can imagine with concurrent threads
touching ptes and possibly allocating memory themselves.
> On the other hand, that still leaves us cgroups. What could
> be appropriate there?
We always seem to end up with a tangle of mysterious dials
and knobs deep in the heart of the the implementation :(
I wonder if there is some other way to approach it, like a
QoS from point of view of caller? That seems to be not so
far removed from the "end result requirements".
e.g., if short term average page allocation latency for a task
exceeds {10us, 100us, 1ms, 10ms}, then start shooting.
This does not catch the theoretical corner case where memory
is reclaimed very quickly, but just reused for the same thing
because a task is thrashing. But in practice, I think thrashing
workloads quickly lead to a lot of write IOs and major allocation
slowdowns anyway, so in practice I think it could work.
And it could be adjusted per task, per cgroup, etc. and would
not depend on reclaim/allocator implementation details.
I'm sure someone will tell me how horribly flawed the idea is
though :(
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-05-02 3:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 20:56 Ying Han
2012-04-23 22:20 ` KOSAKI Motohiro
2012-04-23 23:18 ` Ying Han
2012-04-23 23:19 ` Ying Han
2012-04-24 1:31 ` Minchan Kim
2012-04-24 2:06 ` Ying Han
2012-04-24 16:36 ` Ying Han
2012-04-24 16:38 ` Rik van Riel
2012-04-24 16:45 ` KOSAKI Motohiro
2012-04-24 17:22 ` Ying Han
2012-04-24 17:17 ` Ying Han
2012-04-24 5:36 ` Nick Piggin
2012-04-24 18:37 ` Ying Han
2012-05-01 3:34 ` Nick Piggin
2012-05-01 16:18 ` Ying Han
2012-05-01 16:20 ` Ying Han
2012-05-01 17:06 ` Rik van Riel
2012-05-02 3:25 ` Nick Piggin [this message]
2012-06-11 23:33 ` KOSAKI Motohiro
2012-06-11 23:37 ` KOSAKI Motohiro
2012-06-14 5:25 ` Ying Han
2012-06-12 0:53 ` Rik van Riel
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=CAPa8GCC8YxQ9Z9y3QJprn_MeAUs4XqKi3DLZHpbUVGJbGp2Rpw@mail.gmail.com \
--to=npiggin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=mhocko@suse.cz \
--cc=minchan.kim@gmail.com \
--cc=riel@redhat.com \
--cc=yinghan@google.com \
/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