linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Hugh Dickins <hughd@google.com>
Cc: Ying Han <yinghan@google.com>, Michal Hocko <mhocko@suse.cz>,
	Balbir Singh <bsingharora@gmail.com>,
	Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mel@csn.ul.ie>,
	Pavel Emelyanov <xemul@openvz.org>,
	linux-mm@kvack.org
Subject: Re: memcg: add mlock statistic in memory.stat
Date: Thu, 12 Jan 2012 08:59:37 +0900	[thread overview]
Message-ID: <20120112085937.ae601869.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.LSU.2.00.1201111512570.1846@eggly.anvils>

On Wed, 11 Jan 2012 15:17:42 -0800 (PST)
Hugh Dickins <hughd@google.com> wrote:

> On Wed, 11 Jan 2012, 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.
> > 
> > --- a/include/linux/page_cgroup.h
> > +++ b/include/linux/page_cgroup.h
> > @@ -10,6 +10,7 @@ enum {
> >  	/* flags for mem_cgroup and file and I/O status */
> >  	PCG_MOVE_LOCK, /* For race between move_account v.s. following bits */
> >  	PCG_FILE_MAPPED, /* page is accounted as "mapped" */
> > +	PCG_MLOCK, /* page is accounted as "mlock" */
> >  	/* No lock in page_cgroup */
> >  	PCG_ACCT_LRU, /* page has been accounted for (under lru_lock) */
> >  	__NR_PCG_FLAGS,
> 
> Is this really necessary?  KAMEZAWA-san is engaged in trying to reduce
> the number of PageCgroup flags, and I expect that in due course we shall
> want to merge them in with Page flags, so adding more is unwelcome.
> I'd  have thought that with memcg_ hooks in the right places,
> a separate flag would not be necessary?
> 

Please don't ;)

NR_UNEIVCTABLE_LRU is not enough ?

Following is the patch I posted before to remove PCG_FILE_MAPPED.
Then, I think you can use similar logic and make use of UNEVICTABLE flags.

==
better (lockless) idea is welcomed.

  reply	other threads:[~2012-01-12  0:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 22:41 Ying Han
2012-01-11 23:17 ` Hugh Dickins
2012-01-11 23:59   ` KAMEZAWA Hiroyuki [this message]
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
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=20120112085937.ae601869.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