lkml.org 
[lkml]   [2013]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@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.



\
 
 \ /
  Last update: 2013-05-21 23:01    [W:0.093 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site