Re: [PATCH(v2) -mmotm 2/2] memcg move charge of shmem at task migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Mar 2010 13:06:48 +0900
Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote:

> On Tue, 30 Mar 2010 12:11:19 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > On Tue, 30 Mar 2010 11:49:03 +0900
> > Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote:
> > 
> > > On Tue, 30 Mar 2010 11:23:01 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> 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@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]