linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ying Han <yinghan@google.com>
To: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>,
	Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mel@csn.ul.ie>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>, Greg Thelen <gthelen@google.com>,
	Christoph Lameter <cl@linux.com>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	linux-mm@kvack.org
Subject: Re: [RFC PATCH 6/6] memcg: shrink slab during memcg reclaim
Date: Thu, 16 Aug 2012 22:51:25 -0700	[thread overview]
Message-ID: <CALWz4ix-fv+m6ohLT8Kn6oJk8duBV4RKU--Gx8GV93vR6Nfq-w@mail.gmail.com> (raw)
In-Reply-To: <502DD54F.3010800@parallels.com>

On Thu, Aug 16, 2012 at 10:23 PM, Glauber Costa <glommer@parallels.com> wrote:
> On 08/17/2012 12:54 AM, Ying Han wrote:
>> This patch makes target reclaim shrinks slabs in addition to userpages.
>>
>> Slab shrinkers determine the amount of pressure to put on slabs based on how
>> many pages are on lru (inversely proportional relationship). Calculate the
>> lru_pages correctly based on memcg lru lists instead of global lru lists.
>>
>> Signed-off-by: Ying Han <yinghan@google.com>
>
> This seems fine from where I stand.
>
> So imagining for an instant we apply this patch, and this patch only.
> The behavior we get is that when memcg gets pressure, it will shrink
> globally, but it will at least shrink anything.
>
> It is needless to say this is not enough. But I wonder if this isn't
> better than no shrinking at all ? Maybe this could be put ontop of the
> slab series and be the temporary default while we sort out the whole
> shrinkers problem?

It is a balance between breaking isolation or risking the memcg to
OOM. Today there is no shrink_slab under target reclaim, and I think
that is
bad after your slab accounting patch. But I do worry about the
isolation bit where you might end up throwing memcg B's pages for
memcg A's pressure. Not only for slab pages but also user pages, like
the example I listed on the first patch.

--Ying

>
>

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

      reply	other threads:[~2012-08-17  5:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 20:54 Ying Han
2012-08-17  5:23 ` Glauber Costa
2012-08-17  5:51   ` Ying Han [this message]

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=CALWz4ix-fv+m6ohLT8Kn6oJk8duBV4RKU--Gx8GV93vR6Nfq-w@mail.gmail.com \
    --to=yinghan@google.com \
    --cc=cl@linux.com \
    --cc=glommer@parallels.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.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