linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Ying Han <yinghan@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>, 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>,
	KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH V7 2/2] mm: memcg detect no memcgs above softlimit under zone reclaim
Date: Wed, 1 Aug 2012 10:45:53 +0200	[thread overview]
Message-ID: <20120801084553.GD4436@tiehlicka.suse.cz> (raw)
In-Reply-To: <CALWz4ixF8PzhDs2fuOMTrrRiBHkg+aMzaVOBhuUN78UenzmYbw@mail.gmail.com>

On Tue 31-07-12 13:59:35, Ying Han wrote:
[...]
> Let's say the following example where the cgroup is sorted by css_id,
> and none of the cgroup's usage is above softlimit (except root)
> 
>                                         root  a  b  c  d  e f ...max
> thread_1 (priority = 12)         ^
>                                          iter->position = 1        (
> over_softlimit = true )
> 
>                                                 ^
>                                                  iter->position = 2
> 
> thread_2 (priority = 12)                     ^
>                                                      iter->position = 3
> 
>                                                       ....
>                                                                           ^
> 
>    iter->position = 0  ( over_softlimit = false )
> 
> In this case, thread 1 gets root but not thread 2 since they share the
> walk under same zone (same node) and same reclaim priority.

That is true iterator is per zone per priority if the cookie is used but
that wasn't my point.
Take a much simpler case. Just the background reclaim without any direct
reclaim. Then there is nobody to race with and so we would always visit
the whole tree including the root and so if no group is above the soft
limit we would hammer the root cgroup until priority gets down when we
ignore the limit and reclaim from all. Makes sense?

-- 
Michal Hocko
SUSE Labs

--
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-01  8:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 22:32 [PATCH V7 2/2] mm: memcg detect no memcgs above softlimit under zone reclaim Ying Han
2012-07-31 15:59 ` Michal Hocko
2012-07-31 16:07   ` Rik van Riel
2012-07-31 17:52     ` Ying Han
2012-07-31 17:54   ` Ying Han
2012-07-31 20:02     ` Michal Hocko
2012-07-31 20:59       ` Ying Han
2012-08-01  8:45         ` Michal Hocko [this message]
2012-08-01 19:04           ` Ying Han
2012-08-01 20:10             ` Rik van Riel
2012-08-02  0:09               ` Ying Han
2012-08-02  0:43                 ` Rik van Riel
2012-08-06 14:03               ` Michal Hocko
2012-08-06 14:27                 ` Rik van Riel
2012-08-06 15:11                   ` Michal Hocko
2012-08-06 18:51                     ` Rik van Riel
2012-08-06 21:18                       ` Ying Han
2012-08-06 22:54                         ` 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=20120801084553.GD4436@tiehlicka.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=dhillf@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --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;
as well as URLs for NNTP newsgroup(s).