From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [RFC][PATCH 4/5] memcg: per-cpu charge stock
Date: Mon, 31 Aug 2009 21:07:10 +0900 (JST) [thread overview]
Message-ID: <b18a62cbada2801ab34d591ba65ef906.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <20090831111027.GI4770@balbir.in.ibm.com>
Balbir Singh wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-08-28
> 13:27:06]:
>
>>
>> For avoiding frequent access to res_counter at charge, add per-cpu
>> local charge. Comparing with modifing res_coutner (with percpu_counter),
>> this approach
>> Pros.
>> - we don't have to touch res_counter's cache line
>> - we don't have to chase res_counter's hierarchy
>> - we don't have to call res_counter function.
>> Cons.
>> - we need our own code.
>>
>> Considering trade-off, I think this is worth to do.
>
> I prefer the other part due to
>
> 1. Code reuse (any enhancements made will benefit us)
> 2. Custom batching that can be done easily
> 3. Remember hierarchy is explicitly enabled and we've documented that
> it is expensive
Hmm. the important point is we don't touch res_counter's cacheline in
fast path. And if we don't use memcg's percpu counter, more cacheline/TLB
will be necesary. (I think percpu counter is slow.)
plz rewrite memcg's percpu counter by youself if you want something generic.
I can't understand what you mention by (3).
Thanks,
-Kame
WARNING: multiple messages have this Message-ID (diff)
From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [RFC][PATCH 4/5] memcg: per-cpu charge stock
Date: Mon, 31 Aug 2009 21:07:10 +0900 (JST) [thread overview]
Message-ID: <b18a62cbada2801ab34d591ba65ef906.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <20090831111027.GI4770@balbir.in.ibm.com>
Balbir Singh wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-08-28
> 13:27:06]:
>
>>
>> For avoiding frequent access to res_counter at charge, add per-cpu
>> local charge. Comparing with modifing res_coutner (with percpu_counter),
>> this approach
>> Pros.
>> - we don't have to touch res_counter's cache line
>> - we don't have to chase res_counter's hierarchy
>> - we don't have to call res_counter function.
>> Cons.
>> - we need our own code.
>>
>> Considering trade-off, I think this is worth to do.
>
> I prefer the other part due to
>
> 1. Code reuse (any enhancements made will benefit us)
> 2. Custom batching that can be done easily
> 3. Remember hierarchy is explicitly enabled and we've documented that
> it is expensive
Hmm. the important point is we don't touch res_counter's cacheline in
fast path. And if we don't use memcg's percpu counter, more cacheline/TLB
will be necesary. (I think percpu counter is slow.)
plz rewrite memcg's percpu counter by youself if you want something generic.
I can't understand what you mention by (3).
Thanks,
-Kame
--
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:[~2009-08-31 12:07 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 4:20 [RFC][PATCH 0/5] memcg: reduce lock conetion KAMEZAWA Hiroyuki
2009-08-28 4:20 ` KAMEZAWA Hiroyuki
2009-08-28 4:23 ` [RFC][PATCH 1/5] memcg: change for softlimit KAMEZAWA Hiroyuki
2009-08-28 4:23 ` KAMEZAWA Hiroyuki
2009-08-28 7:20 ` Balbir Singh
2009-08-28 7:20 ` Balbir Singh
2009-08-28 7:35 ` KAMEZAWA Hiroyuki
2009-08-28 7:35 ` KAMEZAWA Hiroyuki
2009-08-28 13:26 ` Balbir Singh
2009-08-28 13:26 ` Balbir Singh
2009-08-28 14:29 ` KAMEZAWA Hiroyuki
2009-08-28 14:29 ` KAMEZAWA Hiroyuki
2009-08-28 14:40 ` KAMEZAWA Hiroyuki
2009-08-28 14:40 ` KAMEZAWA Hiroyuki
2009-08-28 14:46 ` Balbir Singh
2009-08-28 15:06 ` KAMEZAWA Hiroyuki
2009-08-28 15:06 ` KAMEZAWA Hiroyuki
2009-08-28 15:08 ` Balbir Singh
2009-08-28 15:08 ` Balbir Singh
2009-08-28 15:12 ` KAMEZAWA Hiroyuki
2009-08-28 15:12 ` KAMEZAWA Hiroyuki
2009-08-28 15:15 ` Balbir Singh
2009-08-28 15:15 ` Balbir Singh
2009-08-28 14:45 ` Balbir Singh
2009-08-28 14:45 ` Balbir Singh
2009-08-28 14:58 ` KAMEZAWA Hiroyuki
2009-08-28 14:58 ` KAMEZAWA Hiroyuki
2009-08-28 15:07 ` Balbir Singh
2009-08-28 15:07 ` Balbir Singh
2009-08-28 4:24 ` [RFC][PATCH 2/5] memcg: uncharge in batched manner KAMEZAWA Hiroyuki
2009-08-28 4:24 ` KAMEZAWA Hiroyuki
2009-08-28 4:53 ` KAMEZAWA Hiroyuki
2009-08-28 4:53 ` KAMEZAWA Hiroyuki
2009-08-28 4:55 ` KAMEZAWA Hiroyuki
2009-08-28 4:55 ` KAMEZAWA Hiroyuki
2009-08-28 15:10 ` Balbir Singh
2009-08-28 15:10 ` Balbir Singh
2009-08-28 15:21 ` KAMEZAWA Hiroyuki
2009-08-28 15:21 ` KAMEZAWA Hiroyuki
2009-08-28 16:03 ` Balbir Singh
2009-08-28 16:03 ` Balbir Singh
2009-08-31 11:02 ` Balbir Singh
2009-08-31 11:02 ` Balbir Singh
2009-08-31 11:59 ` KAMEZAWA Hiroyuki
2009-08-31 11:59 ` KAMEZAWA Hiroyuki
2009-08-31 12:10 ` Balbir Singh
2009-08-31 12:14 ` KAMEZAWA Hiroyuki
2009-08-31 12:14 ` KAMEZAWA Hiroyuki
2009-08-31 12:23 ` Balbir Singh
2009-08-31 14:36 ` KAMEZAWA Hiroyuki
2009-08-31 14:36 ` KAMEZAWA Hiroyuki
2009-08-28 4:25 ` [RFC][PATCH 3/5] memcg: unmap, truncate, invalidate uncharege in batch KAMEZAWA Hiroyuki
2009-08-28 4:25 ` KAMEZAWA Hiroyuki
2009-08-31 11:02 ` Balbir Singh
2009-08-31 11:02 ` Balbir Singh
2009-08-28 4:27 ` [RFC][PATCH 4/5] memcg: per-cpu charge stock KAMEZAWA Hiroyuki
2009-08-28 4:27 ` KAMEZAWA Hiroyuki
2009-08-31 11:10 ` Balbir Singh
2009-08-31 11:10 ` Balbir Singh
2009-08-31 12:07 ` KAMEZAWA Hiroyuki [this message]
2009-08-31 12:07 ` KAMEZAWA Hiroyuki
2009-08-28 4:28 ` [RFC][PATCH 5/5] memcg: drain per cpu stock KAMEZAWA Hiroyuki
2009-08-28 4:28 ` KAMEZAWA Hiroyuki
2009-08-31 11:11 ` Balbir Singh
2009-08-31 11:11 ` Balbir Singh
2009-08-31 12:09 ` KAMEZAWA Hiroyuki
2009-08-31 12:09 ` KAMEZAWA Hiroyuki
2009-08-28 4:28 ` [RFC][PATCH 0/5] memcg: reduce lock conetion Balbir Singh
2009-08-28 4:28 ` Balbir Singh
2009-08-28 4:33 ` KAMEZAWA Hiroyuki
2009-08-28 4:33 ` 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=b18a62cbada2801ab34d591ba65ef906.squirrel@webmail-b.css.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=balbir@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.