From: Michal Hocko <mhocko@suse.cz>
To: Ying Han <yinghan@google.com>
Cc: 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>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Pavel Emelyanov <xemul@openvz.org>,
linux-mm@kvack.org
Subject: Re: memcg: add mlock statistic in memory.stat
Date: Thu, 12 Jan 2012 21:44:58 +0100 [thread overview]
Message-ID: <20120112204458.GA10389@tiehlicka.suse.cz> (raw)
In-Reply-To: <CALWz4izcSeY3TvrBUurg+X_fyHn3EPGRRS_jvSr0c2CWDnuhAQ@mail.gmail.com>
On Thu 12-01-12 11:09:58, Ying Han wrote:
> On Thu, Jan 12, 2012 at 4:54 AM, Michal Hocko <mhocko@suse.cz> wrote:
> > On Wed 11-01-12 14:41:08, Ying Han wrote:
> >> We have the nr_mlock stat both in meminfo as well as vmstat system wide, this
> >> patch adds the mlock field into per-memcg memory stat. The stat itself enhances
> >> the metrics exported by memcg, especially is used together with "uneivctable"
> >> lru stat.
> >
> > Could you describe when the unevictable has such a different meaning than
> > mlocked that it is unusable?
>
> The unevictable lru includes more than mlock()'d pages ( SHM_LOCK'd
> etc). Like the following:
Yes, I am aware of that. Maybe I wasn't clear enough in my question. I
was rather interested _when_ it actually matters for your decisions about
the setup. Those pages are not evictable anyway.
> $ memtoy>shmem shm_400m 400m
> $ memtoy>map shm_400m 0 400m
> $ memtoy>touch shm_400m
> memtoy: touched 102400 pages in 0.360 secs
> $ memtoy>slock shm_400m
> //meantime add some memory pressure.
>
> $ memtoy>file /export/hda3/file_512m
> $ memtoy>map file_512m 0 512m shared
> $ memtoy>lock file_512m
>
> $ cat /dev/cgroup/memory/B/memory.stat
> mapped_file 956301312
> mlock 536870912
> unevictable 956203008
>
> Here, mapped_file - mlock = 400M shm_lock'ed pages are included in
> unevictable stat.
>
> Besides, not all mlock'ed pages get to unevictable lru at the first
> place, and the same for the other way around.
>
> Thanks
>
> --Ying
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
--
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-01-12 20:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 22:41 memcg: add mlock statistic in memory.stat Ying Han
2012-01-11 23:17 ` Hugh Dickins
2012-01-11 23:59 ` KAMEZAWA Hiroyuki
2012-01-12 0:50 ` Ying Han
2012-01-12 3:21 ` KAMEZAWA Hiroyuki
2012-01-12 19:13 ` Ying Han
2012-01-13 0:10 ` KAMEZAWA Hiroyuki
2012-01-13 22:27 ` Ying Han
2012-01-12 12:54 ` Michal Hocko
2012-01-12 19:09 ` Ying Han
2012-01-12 20:44 ` Michal Hocko [this message]
2012-01-13 22:24 ` Ying Han
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=20120112204458.GA10389@tiehlicka.suse.cz \
--to=mhocko@suse.cz \
--cc=bsingharora@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--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;
as well as URLs for NNTP newsgroup(s).