lkml.org 
[lkml]   [2008]   [Jul]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 05 Jul 2008 11:11:10 +0530
FromBalbir Singh <>
SubjectRe: [PATCH] memcg: handle shmem's swap cache (Was 2.6.26-rc8-mm1
KAMEZAWA Hiroyuki wrote:
> My swapcache accounting under memcg patch failed to catch tmpfs(shmem)'s one.
> Can I test this under -mm tree ?
> (If -mm is busy, I'm not in hurry.)
> This patch works well in my box.
> =
> SwapCache handling fix.
> 
> shmem's swapcache behavior is a little different from anonymous's one and
> memcg failed to handle it. This patch tries to fix it.
> 
> After this:
> 
> Any page marked as SwapCache is not uncharged. (delelte_from_swap_cache()
> delete the SwapCache flag.)
> 
> To check a shmem-page-cache is alive or not we use
>  page->mapping && !PageAnon(page) instead of
>  pc->flags & PAGE_CGROUP_FLAG_CACHE.
> 
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Though I am not opposed to this, I do sit up and think if keeping the reference
count around could avoid this complexity and from my point, the maintenance
overhead of this logic/code (I fear there might be more special cases :( )

The trade-off is complexity versus the overhead of reference counting.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL


\
 
 \ /
  Last update: 2008-07-05 07:43    [from the cache]
©2003-2008