From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754437AbYE3RyR (ORCPT ); Fri, 30 May 2008 13:54:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752664AbYE3RyE (ORCPT ); Fri, 30 May 2008 13:54:04 -0400 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:32908 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752111AbYE3RyC (ORCPT ); Fri, 30 May 2008 13:54:02 -0400 Date: Fri, 30 May 2008 10:54:01 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Rusty Russell cc: akpm@linux-foundation.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Eric Dumazet , Peter Zijlstra , Mike Travis Subject: Re: [patch 05/41] cpu alloc: Percpu_counter conversion In-Reply-To: <200805301647.36198.rusty@rustcorp.com.au> Message-ID: References: <20080530035620.587204923@sgi.com> <20080530040012.011711936@sgi.com> <200805301647.36198.rusty@rustcorp.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 May 2008, Rusty Russell wrote: > On Friday 30 May 2008 13:56:25 Christoph Lameter wrote: > > Use cpu_alloc instead of allocpercpu. > > These patches seem like useless churn. > > Plus, the new code is uglier than the old code :( It drastically reduces the memory size f.e. 4 byte allocations require SLAB f.e. to allocate a 32 byte chunk. This reduces memory requirements by 32/4 = 8 times. Plus the per cpu counters allocated in order are likely placed in the same cacheline (whereas the slab allocators avoid placing multiple objects in the same cacheline). Reduces cache footprint.