linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Ying Han <yinghan@google.com>
Cc: Michal Hocko <mhocko@suse.cz>,
	Balbir Singh <bsingharora@gmail.com>,
	Rik van Riel <riel@redhat.com>, Hugh Dickins <hughd@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mel@csn.ul.ie>,
	Pavel Emelyanov <xemul@openvz.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH] memcg: fix up documentation on global LRU.
Date: Mon, 6 Feb 2012 10:46:49 +0900	[thread overview]
Message-ID: <20120206104649.01a89d66.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <CALWz4iz48O2TcGOFaGw1_FyhzJ_7njgZ_p8cELcpDJuuKa=Gxg@mail.gmail.com>

On Fri, 3 Feb 2012 12:15:59 -0800
Ying Han <yinghan@google.com> wrote:

> On Fri, Feb 3, 2012 at 8:11 AM, Michal Hocko <mhocko@suse.cz> wrote:
> > On Thu 02-02-12 17:37:13, Ying Han wrote:
> >> In v3.3-rc1, the global LRU has been removed with commit
> >> "mm: make per-memcg LRU lists exclusive". The patch fixes up the memcg docs.
> >>
> >> Signed-off-by: Ying Han <yinghan@google.com>
> >
> > For the global LRU removal
> > Acked-by: Michal Hocko <mhocko@suse.cz>
> >
> > see the comment about the swap extension bellow.
> >
> > Thanks
> >
> >> ---
> >> A Documentation/cgroups/memory.txt | A  25 ++++++++++++-------------
> >> A 1 files changed, 12 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
> >> index 4c95c00..847a2a4 100644
> >> --- a/Documentation/cgroups/memory.txt
> >> +++ b/Documentation/cgroups/memory.txt
> > [...]
> >> @@ -209,19 +208,19 @@ In this case, setting memsw.limit_in_bytes=3G will prevent bad use of swap.
> >> A By using memsw limit, you can avoid system OOM which can be caused by swap
> >> A shortage.
> >>
> >> -* why 'memory+swap' rather than swap.
> >> -The global LRU(kswapd) can swap out arbitrary pages. Swap-out means
> >> -to move account from memory to swap...there is no change in usage of
> >> -memory+swap. In other words, when we want to limit the usage of swap without
> >> -affecting global LRU, memory+swap limit is better than just limiting swap from
> >> -OS point of view.
> >> -
> >> A * What happens when a cgroup hits memory.memsw.limit_in_bytes
> >> A When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out
> >> A in this cgroup. Then, swap-out will not be done by cgroup routine and file
> >> -caches are dropped. But as mentioned above, global LRU can do swapout memory
> >> -from it for sanity of the system's memory management state. You can't forbid
> >> -it by cgroup.
> >> +caches are dropped.
> >> +
> >> +TODO:
> >> +* use 'memory+swap' rather than swap was due to existence of global LRU.
> 
> I wasn't sure about the initial comment while making the patch. Since
> it mentions something about global LRU, which i figured we need to
> revisit it anyway.
> 

The "global LRU" here means 'the health of the whole memory management".
memory+swap guarantees memcg will never be obstacles for routines which
works for system memory management.

soft-limit _is_ a hint for global lru. but memory+swap will never be.

Thanks,
-Kame

--
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-02-06  1:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03  1:37 Ying Han
2012-02-03  2:38 ` KAMEZAWA Hiroyuki
2012-02-03 20:03   ` Ying Han
2012-02-06  1:48     ` KAMEZAWA Hiroyuki
2012-02-06 20:02       ` Ying Han
2012-02-03 16:11 ` Michal Hocko
2012-02-03 20:15   ` Ying Han
2012-02-06  1:46     ` KAMEZAWA Hiroyuki [this message]
2012-02-06 20:00       ` Ying Han
2012-02-07  0:21         ` KAMEZAWA Hiroyuki
2012-02-06 20:19 Ying Han
2012-02-09  1:26 ` 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=20120206104649.01a89d66.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=bsingharora@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    --cc=xemul@openvz.org \
    --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