Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965288AbWHOIIg (ORCPT ); Tue, 15 Aug 2006 04:08:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965290AbWHOIIg (ORCPT ); Tue, 15 Aug 2006 04:08:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56754 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S965288AbWHOIIe (ORCPT ); Tue, 15 Aug 2006 04:08:34 -0400 To: Andrew Morton Cc: David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/1] network memory allocator. References: <20060814110359.GA27704@2ka.mipt.ru> <20060815002724.a635d775.akpm@osdl.org> From: Andi Kleen Date: 15 Aug 2006 10:08:23 +0200 In-Reply-To: <20060815002724.a635d775.akpm@osdl.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 785 Lines: 19 Andrew Morton writes: > > There will be heaps of cacheline pingpong accessing these arrays. I'd have > though that > > static struct whatever { > avl_t avl_node_id; > struct avl_node **avl_node_array; > struct list_head *avl_container_array; > struct avl_node *avl_root; > struct avl_free_list *avl_free_list_head; > spinlock_t avl_free_lock; > } __cacheline_aligned_in_smp whatevers[NR_CPUS]; > > would be better. Or even better per cpu data. New global/static NR_CPUS arrays should be really discouraged. -Andi - 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/