linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Ying Han <yinghan@google.com>
Cc: Michal Hocko <mhocko@suse.cz>, Mel Gorman <mel@csn.ul.ie>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>, Hillf Danton <dhillf@gmail.com>,
	Hugh Dickins <hughd@google.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH V3 1/2] memcg: softlimit reclaim rework
Date: Sat, 21 Apr 2012 01:15:01 +0200	[thread overview]
Message-ID: <20120420231501.GE2536@cmpxchg.org> (raw)
In-Reply-To: <CALWz4iyTH8a77w2bOkSXiODiNEn+L7SFv8Njp1_fRwi8aFVZHw@mail.gmail.com>

On Fri, Apr 20, 2012 at 11:22:14AM -0700, Ying Han wrote:
> On Fri, Apr 20, 2012 at 2:17 AM, Michal Hocko <mhocko@suse.cz> wrote:
> > On Tue 17-04-12 09:38:02, Ying Han wrote:
> >> This patch reverts all the existing softlimit reclaim implementations and
> >> instead integrates the softlimit reclaim into existing global reclaim logic.
> >>
> >> The new softlimit reclaim includes the following changes:
> >>
> >> 1. add function should_reclaim_mem_cgroup()
> >>
> >> Add the filter function should_reclaim_mem_cgroup() under the common function
> >> shrink_zone(). The later one is being called both from per-memcg reclaim as
> >> well as global reclaim.
> >>
> >> Today the softlimit takes effect only under global memory pressure. The memcgs
> >> get free run above their softlimit until there is a global memory contention.
> >> This patch doesn't change the semantics.
> >
> > I am not sure I understand but I think it does change the semantics.
> > Previously we looked at a group with the biggest excess and reclaim that
> > group _hierarchically_.
> 
> yes, we don't do _hierarchically_ reclaim reclaim in this patch. Hmm,
> that might be what Johannes insists to preserve on the other
> thread.... ?

Yes, that is exactly what I was talking about all along :-)

To reiterate, in the case of

A (soft = 10G)
  A1
  A2
  A3
  ...

global reclaim should go for A, A1, A2, A3, ... when their sum usage
goes above 10G.  Regardless of any setting in those subgroups, for
reasons I outlined in the other subthread (basically, allowing
children to override parental settings assumes you trust all children
and their settings to be 'cooperative', which is unprecedented cgroup
semantics, afaics, and we can already see this will make problems in
the future)

Meanwhile, if you don't want a hierarchical limit, don't set a
hierarchical limit.  It's possible to organize the tree such that you
don't need to, and it should not be an unreasonable amount of work to
do so).

--
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>

  reply	other threads:[~2012-04-20 23:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 16:38 Ying Han
2012-04-20  9:17 ` Michal Hocko
2012-04-20 18:22   ` Ying Han
2012-04-20 23:15     ` Johannes Weiner [this message]
2012-04-20 23:27       ` Ying Han
2012-04-23  0:31       ` KAMEZAWA Hiroyuki

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=20120420231501.GE2536@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=dan.magenheimer@oracle.com \
    --cc=dhillf@gmail.com \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=mhocko@suse.cz \
    --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