Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761554Ab3EAPxn (ORCPT ); Wed, 1 May 2013 11:53:43 -0400 Received: from mga09.intel.com ([134.134.136.24]:59906 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761541Ab3EAPxi (ORCPT ); Wed, 1 May 2013 11:53:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,589,1363158000"; d="scan'208";a="329645397" Subject: Re: [PATCH 1/2] Make the batch size of the percpu_counter configurable From: Tim Chen To: Simon Jeons Cc: Andrew Morton , Tejun Heo , Christoph Lameter , Al Viro , Dave Hansen , Andi Kleen , linux-kernel , linux-mm In-Reply-To: <51809F8D.3040305@gmail.com> References: <51809F8D.3040305@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 01 May 2013 08:53:39 -0700 Message-ID: <1367423619.27102.198.camel@schen9-DESK> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 26 On Wed, 2013-05-01 at 12:52 +0800, Simon Jeons wrote: > Hi Tim, > On 04/30/2013 01:12 AM, Tim Chen 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'. > > > > I have chosen to implement the added field of batch as a pointer > > (by default point to percpu_counter_batch) instead > > of a static value. The reason is the percpu_counter initialization > > can be called when we only have boot cpu and not all cpus are online. > > What's the meaning of boot cpu? Do you mean cpu 0? > Yes. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/