From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH(v2) -mmotm 2/2] memcg move charge of shmem at task migration
Date: Tue, 30 Mar 2010 13:51:59 +0900 [thread overview]
Message-ID: <20100330135159.025b9366.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20100330130648.ad559645.nishimura@mxp.nes.nec.co.jp>
On Tue, 30 Mar 2010 13:06:48 +0900
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> On Tue, 30 Mar 2010 12:11:19 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > On Tue, 30 Mar 2010 11:49:03 +0900
> > Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> >
> > > On Tue, 30 Mar 2010 11:23:01 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > > > SHARED mapped file cache is not moved by patch [1/2] ???
> > > > It sounds strange.
> > > >
> > > hmm, I'm sorry I'm not so good at user applications, but is it usual to use
> > > VM_SHARED file caches(!tmpfs) ?
> > > And is it better for us to move them only when page_mapcount() == 1 ?
> > >
> >
> > Considering shared library which has only one user, moving MAP_SHARED makes sense.
> > Unfortunately, there are people who creates their own shared library just for
> > their private dlopen() etc. (shared library for private use...)
> >
> > So, I think moving MAP_SHARED files makes sense.
> >
> Thank you for your explanations.
> I'll update my patches to allow to move MAP_SHARED(but page_mapcount() == 1)
> file caches, and resend.
>
Hmm, considering again...current summary is following...right ?
- If page is an anon, it's not moved if page_mapcount() > 2.
- If page is a page cache, it's not moved if page_mapcount() > 2.
- If page is a shmem, it's not moved regardless of mapcount.
- If pte is swap, it's not moved refcnt > 2.
I think following is straightforward and simple.
- If page is an anon or swap of anon, it's not moved if referer > 2.
(i.e. inherited from it's parent)
- If page is file,shmem or swap of shmem, it's moved regardless of referer.
But pages only under "from" memcg can be moved.
I doubt adding too much speciality to shmem is not good.
How do you think ?
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-03-30 4:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 3:02 [PATCH -mmotm 0/2] memcg: move charge of file cache/shmem Daisuke Nishimura
2010-03-29 3:03 ` [PATCH -mmotm 1/2] memcg move charge of file cache at task migration Daisuke Nishimura
2010-03-29 4:15 ` KAMEZAWA Hiroyuki
2010-03-30 1:32 ` [PATCH(v2) " Daisuke Nishimura
2010-03-30 1:50 ` KAMEZAWA Hiroyuki
2010-03-30 5:46 ` Balbir Singh
2010-03-29 3:03 ` [PATCH -mmotm 2/2] memcg move charge of shmem " Daisuke Nishimura
2010-03-29 4:36 ` KAMEZAWA Hiroyuki
2010-03-30 1:33 ` [PATCH(v2) " Daisuke Nishimura
2010-03-30 1:58 ` KAMEZAWA Hiroyuki
2010-03-30 2:23 ` KAMEZAWA Hiroyuki
2010-03-30 2:49 ` Daisuke Nishimura
2010-03-30 3:11 ` KAMEZAWA Hiroyuki
2010-03-30 4:06 ` Daisuke Nishimura
2010-03-30 4:51 ` KAMEZAWA Hiroyuki [this message]
2010-03-30 5:00 ` Balbir Singh
2010-03-30 5:09 ` KAMEZAWA Hiroyuki
2010-03-30 5:30 ` Daisuke Nishimura
2010-03-30 5:44 ` KAMEZAWA Hiroyuki
2010-03-30 6:29 ` KAMEZAWA Hiroyuki
2010-03-31 0:34 ` Daisuke Nishimura
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=20100330135159.025b9366.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
/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