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 10:30:50 +0530
Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> [2010-03-30 13:51:59]:
> > > > 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.
> > > > 
> 
> IIRC, the libraries are loaded with MAP_PRIVATE and MAP_SHARED is not
> set.
> 
Ah, yes. I was wrong.
But changing handling of MAP_SHARED/MAP_PRIVATE is not good.
It will give much confusion to users.


> > > 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. 
> 
> What is referer in this context? The cgroup refering to the page?
> 
page_mapcount(page) + refcnt_to_swap_entry(ent.val)

Bye.
-Kame
> >    (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.
> >
> 
> Yep, I tend to agree, but I need to take a closer look again at the
> patches. 
> 
> -- 
> 	Three Cheers,
> 	Balbir
> 

--
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]