Received: with ECARTIS (v1.0.0; list netdev); Mon, 23 Dec 2002 12:17:57 -0800 (PST) Received: from pizda.ninka.net (IDENT:root@pizda.ninka.net [216.101.162.242]) by oss.sgi.com (8.12.5/8.12.5) with SMTP id gBNKHs3v022831 for ; Mon, 23 Dec 2002 12:17:54 -0800 Received: from localhost (IDENT:davem@localhost.localdomain [127.0.0.1]) by pizda.ninka.net (8.9.3/8.9.3) with ESMTP id MAA28292; Mon, 23 Dec 2002 12:16:32 -0800 Date: Mon, 23 Dec 2002 12:16:32 -0800 (PST) Message-Id: <20021223.121632.105420794.davem@redhat.com> To: kiran@in.ibm.com Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [patch] Convert sockets_in_use to use per_cpu areas From: "David S. Miller" In-Reply-To: <20021223190847.G23413@in.ibm.com> References: <20021223190847.G23413@in.ibm.com> X-FalunGong: Information control. X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 1417 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@redhat.com Precedence: bulk X-list: netdev From: Ravikiran G Thirumalai Date: Mon, 23 Dec 2002 19:08:48 +0530 -static union { - int counter; - char __pad[SMP_CACHE_BYTES]; -} sockets_in_use[NR_CPUS] __cacheline_aligned = {{0}}; +static DEFINE_PER_CPU(int, sockets_in_use); You have to provide an explicit initializer for DEFINE_PER_CPU declarations or you break some platforms with older GCC's which otherwise won't put it into the proper section.