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 14:44:58 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> On Tue, 30 Mar 2010 14:30:38 +0900
> Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote:
> 
> > 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]:
> > > 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@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]