All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH(v2) -mmotm 2/2] memcg move charge of shmem at task migration
Date: Tue, 30 Mar 2010 15:29:58 +0900	[thread overview]
Message-ID: <20100330152958.0c31b8d5.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20100330144458.403b429c.kamezawa.hiroyu@jp.fujitsu.com>

On Tue, 30 Mar 2010 14:44:58 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> On Tue, 30 Mar 2010 14:30:38 +0900
> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> 
> > On Tue, 30 Mar 2010 10:30:50 +0530, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-03-30 13:51:59]:
> > > Yep, I tend to agree, but I need to take a closer look again at the
> > > patches. 
> > > 
> > I agree it would be more simple. I selected the current policy because
> > I was not sure whether we should move file caches(!tmpfs) with mapcount > 1,
> > and, IMHO, shared memory and file caches are different for users.
> > But it's O.K. for me to change current policy.
> > 
> 
> To explain what I think of, I wrote a patch onto yours. (Maybe overkill for explaination ;)
> 
> Summary.
> 
>  + adding move_anon, move_file, move_shmem information to move_charge_struct.
>  + adding hanlders for each pte types.
>  + checking # of referer should be divided to each type.
>    It's complicated to catch all cases in one "if" sentense.
>  + FILE pages will be moved if it's charged against "from". no mapcount check.
>    i.e. FILE pages should be moved even if it's not page-faulted.
>  + ANON pages will be moved if it's really private.
> 
> For widely shared FILE, "if it's charged against "from"" is enough good limitation.
> 
> 

Hmm....how about changing meanings of new flags ?

1 : a charge of page caches are moved. Page cache means cache of regular files
    and shared memory. But only privately mapped pages (mapcount==1) are moved.

2 : a charge of page caches are moved. Page cache means cache of regular files
    and shared memory. They are moved even if it's shared among processes.

When both of 1 and 2 are specified, "2" is used. Anonymous pages will not be
moved if it's shared.

Then, total view of user interface will be simple and I think this will allow
what you want.

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>

  reply	other threads:[~2010-03-30  6:33 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
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 [this message]
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=20100330152958.0c31b8d5.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.