lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Dec 2010 09:01:03 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: add replace_page_cache_page() function

On Thu, 16 Dec 2010 13:05:44 +0100
Miklos Szeredi <miklos@...redi.hu> wrote:

> On Thu, 16 Dec 2010, KAMEZAWA Hiroyuki wrote:

> > Hmm, then, the page will be recharged to "current" instead of the memcg
> > where "old" was under control. Is this design ? If so, why ?
> 
> No, I just haven't thought about it.
> 
> Porbably charging "new" to where "old" was charged is the logical
> thing to do here.
> 
> > 
> > In mm/migrate.c, following is called.
> > 
> > 	 charge = mem_cgroup_prepare_migration(page, newpage, &mem);
> > 	....do migration....
> >         if (!charge)
> >                 mem_cgroup_end_migration(mem, page, newpage);
> > 
> > BTW, off topic, in fuse/dev.c
> > 
> > add_to_page_cache_locked(page)
> 
> This is the call which the above patch replaces with
> replace_page_cache_page().  So if I fix replace_page_cache_page() to
> charge "newpage" to the correct memory cgroup, that should solve all
> problems, no?
> 
No. memory cgroup expects all pages should be found on LRU. But, IIUC,
pages on this radix-tree will not be on LRU. So, memory cgroup can't find
it at destroying cgroup and can't reduce "usage" of resource to be 0.
This makes rmdir() returns -EBUSY.

I'm sorry if this page will be on LRU, somewhere.

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ