Thread (45 messages) 45 messages, 5 authors, 2012-07-12

Re: [patch 03/11] mm: shmem: do not try to uncharge known swapcache pages

From: Michal Hocko <hidden>
Date: 2012-07-09 14:47:03
Also in: linux-mm, lkml

On Thu 05-07-12 02:44:55, Johannes Weiner wrote:
quoted hunk ↗ jump to hunk
Once charged, swapcache pages can only be uncharged after they are
removed from swapcache again.

Do not try to uncharge pages that are known to be in the swapcache, to
allow future patches to remove checks for that in the uncharge code.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/shmem.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/mm/shmem.c b/mm/shmem.c
index ee1c5a2..d12b705 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -302,8 +302,6 @@ static int shmem_add_to_page_cache(struct page *page,
 		if (!expected)
 			radix_tree_preload_end();
 	}
-	if (error)
-		mem_cgroup_uncharge_cache_page(page);
Maybe I am missing something but who does the uncharge from:
shmem_unuse
  mem_cgroup_cache_charge
  shmem_unuse_inode
    shmem_add_to_page_cache

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help