On Fri, 3 May 2013 03:10:52 -0700 Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx> 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>