login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
June
»
11
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Daisuke Nishimura
Subject:
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
Date: Thursday, June 10, 2010 - 9:59 pm
On Fri, 11 Jun 2010 13:52:02 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
quoted text
> On Fri, 11 Jun 2010 13:37:44 +0900 > Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote: > > > > @@ -2432,15 +2463,18 @@ mem_cgroup_uncharge_swapcache(struct pag > > > if (!swapout) /* this was a swap cache but the swap is unused ! */ > > > ctype = MEM_CGROUP_CHARGE_TYPE_DROP; > > > > > > - memcg = __mem_cgroup_uncharge_common(page, ctype); > > > + memcg = try_get_mem_cgroup_from_page(page); > > > + if (!memcg) > > > + return; > > > + > > > + __mem_cgroup_uncharge_common(page, ctype); > > > > > > /* record memcg information */ > > > - if (do_swap_account && swapout && memcg) { > > > + if (do_swap_account && swapout) { > > > swap_cgroup_record(ent, css_id(&memcg->css)); > > > mem_cgroup_get(memcg); > > > } > > > - if (swapout && memcg) > > > - css_put(&memcg->css); > > > + css_put(&memcg->css); > > > } > > > #endif > > > > > hmm, this change seems to cause a problem. > > I can see under flow of mem->memsw and "swap" field in memory.stat. > > > > I think doing swap_cgroup_record() against mem_cgroup which is not returned > > by __mem_cgroup_uncharge_common() is a bad behavior. > > > > How about doing like this ? We can safely access mem_cgroup while it has > > memory.usage, iow, before we call res_counter_uncharge(). > > After this change, it seems to work well. > > > > Thank you!. seems to work. I'll merge your change. > Can I add your Signed-off-by ? >
Sure. Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC][PATCH] memcg remove css_get/put per pages v2
, KAMEZAWA Hiroyuki
, (Tue Jun 8, 11:59 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, Daisuke Nishimura
, (Wed Jun 9, 7:34 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, KAMEZAWA Hiroyuki
, (Wed Jun 9, 7:49 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, Daisuke Nishimura
, (Thu Jun 10, 9:37 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, KAMEZAWA Hiroyuki
, (Thu Jun 10, 9:52 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, Daisuke Nishimura
, (Thu Jun 10, 9:59 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, Balbir Singh
, (Thu Jun 10, 11:11 pm)
Re: [RFC][PATCH] memcg remove css_get/put per pages v2
, KAMEZAWA Hiroyuki
, (Thu Jun 10, 11:21 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth