[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090512170007.ad7f5c7b.nishimura@mxp.nes.nec.co.jp>
Date: Tue, 12 May 2009 17:00:07 +0900
From: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: nishimura@....nes.nec.co.jp,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
mingo@...e.hu,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/3] memcg: call uncharge_swapcache outside of tree_lock
(Re: [PATCH 0/3] fix stale swap cache account leak in memcg v7)
> I understand the problem, but, wait a bit. NACK to this patch itself.
>
> 1. I placed _uncharge_ inside tree_lock because __remove_from_page_cache() does.
> (i.e. using the same logic.)
> So, plz change both logic at once.(change caller of mem_cgroup_uncharge_cache_page())
>
hmm, I see.
cache_charge is outside of tree_lock, so moving uncharge would make sense.
IMHO, we should make the period of spinlock as small as possible,
and charge/uncharge of pagecache/swapcache is protected by page lock, not tree_lock.
> 2. Shouldn't we disable IRQ while __mem_cgroup_uncharge_common() rather than moving
> function ?
>
Yes, this is another choise.
But, isn't it better to disable IRQ at all users of lock_page_cgroup..unlock_page_cgroup
to avoid this dead lock ?
Anyway, I'll postpone this fix for a while.
We should fix stale swap swapcache first.
Thanks,
Daisuke Nishimura.
--
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