From: Andrew Morton <akpm@linux-foundation.org>
To: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Eric Dumazet <eric.dumazet@gmail.com>,
Ric Mason <ric.masonn@gmail.com>,
Simon Jeons <simon.jeons@gmail.com>,
Dave Hansen <dave.hansen@intel.com>,
Andi Kleen <ak@linux.intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH v2 1/2] Make the batch size of the percpu_counter configurable
Date: Tue, 21 May 2013 13:41:22 -0700 [thread overview]
Message-ID: <20130521134122.4d8ea920c0f851fc2d97abc9@linux-foundation.org> (raw)
In-Reply-To: <8584b08e57e97ecc4769859b751ad459d038a730.1367574872.git.tim.c.chen@linux.intel.com>
On Fri, 3 May 2013 03:10:52 -0700 Tim Chen <tim.c.chen@linux.intel.com> wrote:
> Currently, there is a single, global, variable (percpu_counter_batch) that
> controls the batch sizes for every 'struct percpu_counter' on the system.
>
> However, there are some applications, e.g. memory accounting where it is
> more appropriate to scale the batch size according to the memory size.
> This patch adds the infrastructure to be able to change the batch sizes
> for each individual instance of 'struct percpu_counter'.
>
This patch seems to add rather a lot of unnecessary code.
- The increase in the size of percu_counter is regrettable.
- The change to percpu_counter_startup() is unneeded - no
percpu_counters should exist at this time. (We may have screwed this
up - percpu_counter_startup() shuold probably be explicitly called
from start_kernel()).
- Once the percpu_counter_startup() change is removed, all that code
which got moved out of CONFIG_HOTPLUG_CPU can be put back.
And probably other stuff.
If you want to use a larger batch size for vm_committed_as, why not
just use the existing __percpu_counter_add(..., batch)? Easy.
next prev parent reply other threads:[~2013-05-21 20:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 10:10 Tim Chen
2013-05-03 10:10 ` [PATCH v2 2/2] Make batch size for memory accounting configured according to size of memory Tim Chen
2013-05-21 20:41 ` Andrew Morton [this message]
2013-05-21 23:27 ` [PATCH v2 1/2] Make the batch size of the percpu_counter configurable Tim Chen
2013-05-21 23:41 ` Andrew Morton
2013-05-22 0:43 ` Tim Chen
2013-05-22 7:20 ` Andrew Morton
2013-05-22 23:37 ` Tim Chen
2013-05-29 19:26 ` Andrew Morton
2013-05-29 21:20 ` Tim Chen
2013-05-29 21:34 ` Andrew Morton
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=20130521134122.4d8ea920c0f851fc2d97abc9@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ak@linux.intel.com \
--cc=cl@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ric.masonn@gmail.com \
--cc=simon.jeons@gmail.com \
--cc=tim.c.chen@linux.intel.com \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®