Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932427AbWA0JBk (ORCPT ); Fri, 27 Jan 2006 04:01:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932424AbWA0JBk (ORCPT ); Fri, 27 Jan 2006 04:01:40 -0500 Received: from gw1.cosmosbay.com ([62.23.185.226]:36049 "EHLO gw1.cosmosbay.com") by vger.kernel.org with ESMTP id S932427AbWA0JBj (ORCPT ); Fri, 27 Jan 2006 04:01:39 -0500 Message-ID: <43D9E15B.9000407@cosmosbay.com> Date: Fri, 27 Jan 2006 10:01:15 +0100 From: Eric Dumazet User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Ravikiran G Thirumalai CC: Andrew Morton , davem@davemloft.net, linux-kernel@vger.kernel.org, shai@scalex86.org, netdev@vger.kernel.org, pravins@calsoftinc.com Subject: Re: [patch 2/4] net: Percpufy frequently used variables -- struct proto.memory_allocated References: <20060126185649.GB3651@localhost.localdomain> <20060126190212.GD3651@localhost.localdomain> In-Reply-To: <20060126190212.GD3651@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [172.16.8.80]); Fri, 27 Jan 2006 10:01:14 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 967 Lines: 28 Ravikiran G Thirumalai a ?crit : > Change struct proto->memory_allocated to a batching per-CPU counter > (percpu_counter) from an atomic_t. A batching counter is better than a > plain per-CPU counter as this field is read often. > > Signed-off-by: Pravin B. Shelar > Signed-off-by: Ravikiran Thirumalai > Signed-off-by: Shai Fultheim > Hello Ravikiran I like this patch, but I'm not sure current percpu_counter fits the needs. The percpu_counter_read() can return a value that is off by +- FBC_BATCH*NR_CPUS, ie 2*(NR_CPUS^2) or 4*(NR_CPUS^2) if NR_CPUS = 128, the 'error' from percpu_counter_read() is +- 32768 Is it acceptable ? Thank you Eric - 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/