Thread (59 messages) 59 messages, 7 authors, 2014-07-25

Re: [patch 13/13] mm: memcontrol: rewrite uncharge API

From: Naoya Horiguchi <hidden>
Date: 2014-07-16 14:58:18
Also in: linux-mm, lkml

On Wed, Jul 16, 2014 at 10:14:47AM -0400, Johannes Weiner wrote:
...
quoted
quoted
 	free_hot_cold_page(page, false);
 }
 
@@ -75,7 +75,10 @@ static void __put_compound_page(struct page *page)
 {
 	compound_page_dtor *dtor;
 
-	__page_cache_release(page);
+	if (!PageHuge(page)) {
+		__page_cache_release(page);
+		mem_cgroup_uncharge_page(page);
I reverted all these mm/swap.c changes again as well.  Instead,
mem_cgroup_uncharge() now does a preliminary check if the page is
charged before it touches page->lru.

That should be much more robust: now the vetting whether a page is
valid for memcg happens at charge time only, all other operations
check first if a page is charged before doing anything else to it.

These two places should be the only ones that need fixing then:
This change also passed my testing, so the problem should be fixed.

Thanks,
Naoya Horiguchi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help