From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] memcg remove css_get/put per pages v2
Date: Fri, 11 Jun 2010 11:41:02 +0530 [thread overview]
Message-ID: <20100611061102.GF5191@balbir.in.ibm.com> (raw)
In-Reply-To: <20100609155940.dd121130.kamezawa.hiroyu@jp.fujitsu.com>
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2010-06-09 15:59:40]:
> + if (consume_stock(mem)) {
> + /*
> + * It seems dagerous to access memcg without css_get().
> + * But considering how consume_stok works, it's not
> + * necessary. If consume_stock success, some charges
> + * from this memcg are cached on this cpu. So, we
> + * don't need to call css_get()/css_tryget() before
> + * calling consume_stock().
> + */
> + rcu_read_unlock();
> + goto done;
> + }
> + if (!css_tryget(&mem->css)) {
If tryget fails, can one assume that this due to a race and the mem is
about to be freed?
--
Three Cheers,
Balbir
--
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>
next prev parent reply other threads:[~2010-06-11 7:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-08 3:19 [RFC][PATCH] memcg remove css_get/put per pages KAMEZAWA Hiroyuki
2010-06-08 5:40 ` Balbir Singh
2010-06-09 0:47 ` KAMEZAWA Hiroyuki
2010-06-09 5:14 ` KAMEZAWA Hiroyuki
2010-06-08 7:31 ` Daisuke Nishimura
2010-06-09 0:54 ` KAMEZAWA Hiroyuki
2010-06-09 2:05 ` Daisuke Nishimura
2010-06-09 6:59 ` [RFC][PATCH] memcg remove css_get/put per pages v2 KAMEZAWA Hiroyuki
2010-06-10 2:34 ` Daisuke Nishimura
2010-06-10 2:49 ` KAMEZAWA Hiroyuki
2010-06-11 4:37 ` Daisuke Nishimura
2010-06-11 4:52 ` KAMEZAWA Hiroyuki
2010-06-11 4:59 ` Daisuke Nishimura
2010-06-11 6:11 ` Balbir Singh [this message]
2010-06-11 6:21 ` KAMEZAWA Hiroyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100611061102.GF5191@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox