[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130521134122.4d8ea920c0f851fc2d97abc9@linux-foundation.org>
Date: Tue, 21 May 2013 13:41:22 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>,
Eric Dumazet <eric.dumazet@...il.com>,
Ric Mason <ric.masonn@...il.com>,
Simon Jeons <simon.jeons@...il.com>,
Dave Hansen <dave.hansen@...el.com>,
Andi Kleen <ak@...ux.intel.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-mm <linux-mm@...ck.org>
Subject: Re: [PATCH v2 1/2] Make the batch size of the percpu_counter
configurable
On Fri, 3 May 2013 03:10:52 -0700 Tim Chen <tim.c.chen@...ux.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists