Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_file stat

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daisuke Nishimura
Date: Tuesday, April 13, 2010 - 5:54 pm

On Tue, 13 Apr 2010 15:14:00 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
hmm, I want to call mem_cgroup_update_file_mapped() only where we update
NR_FILE_MAPPED, but, okey, I see your concern.

Adding likely() is better ? IIUC, these conditions are usually met except for
the case of page migration. And, can you add a comment about it ?

We cannot rely on page lock, because when we succeeded in page migration,
"target" = "newpage" has already unlocked in move_to_new_page(). So the "target"
can be removed from the radix-tree theoretically(it's not related to this
underflow problem, though).
Shouldn't we call lock_page(target) and check "if (!target->mapping)" to handle
this case(maybe in another patch) ?

Thanks,
Daisuke Nishimura.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_file stat, Daisuke Nishimura, (Mon Apr 12, 9:42 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., KAMEZAWA Hiroyuki, (Mon Apr 12, 11:14 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., Daisuke Nishimura, (Tue Apr 13, 5:54 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., KAMEZAWA Hiroyuki, (Tue Apr 13, 6:03 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., KAMEZAWA Hiroyuki, (Tue Apr 13, 6:40 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., KAMEZAWA Hiroyuki, (Tue Apr 13, 6:56 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., KAMEZAWA Hiroyuki, (Tue Apr 13, 8:06 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., Daisuke Nishimura, (Tue Apr 13, 10:31 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., KAMEZAWA Hiroyuki, (Tue Apr 13, 10:40 pm)
Re: [RFC][BUGFIX][PATCH] memcg: fix underflow of mapped_fi ..., Daisuke Nishimura, (Wed Apr 14, 7:22 pm)
[RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass route of ..., KAMEZAWA Hiroyuki, (Wed Apr 14, 8:05 pm)
[RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underflow ..., KAMEZAWA Hiroyuki, (Wed Apr 14, 8:06 pm)
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass rout ..., Daisuke Nishimura, (Wed Apr 14, 11:43 pm)
Re: [RFC][BUGFIX][PATCH 1/2] memcg: fix charge bypass rout ..., KAMEZAWA Hiroyuki, (Wed Apr 14, 11:56 pm)
[RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underflow ..., KAMEZAWA Hiroyuki, (Fri Apr 16, 3:31 am)
Interleave policy on 2M pages (was Re: [RFC][BUGFIX][PATCH ..., Christoph Lameter, (Fri Apr 16, 9:13 am)
Re: Interleave policy on 2M pages (was Re: [RFC][BUGFIX][P ..., Andrea Arcangeli, (Fri Apr 16, 10:51 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., Daisuke Nishimura, (Sun Apr 18, 8:42 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., KAMEZAWA Hiroyuki, (Sun Apr 18, 9:18 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., Daisuke Nishimura, (Mon Apr 19, 1:07 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., KAMEZAWA Hiroyuki, (Mon Apr 19, 1:26 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., Daisuke Nishimura, (Mon Apr 19, 9:20 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., KAMEZAWA Hiroyuki, (Mon Apr 19, 9:26 pm)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., KAMEZAWA Hiroyuki, (Tue Apr 20, 2:19 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., Daisuke Nishimura, (Fri Apr 23, 1:08 am)
Re: [RFC][BUGFIX][PATCH 2/2] memcg: fix file mapped underf ..., KAMEZAWA Hiroyuki, (Fri Apr 23, 1:23 am)