From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932205AbWDLUYB (ORCPT ); Wed, 12 Apr 2006 16:24:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932222AbWDLUYA (ORCPT ); Wed, 12 Apr 2006 16:24:00 -0400 Received: from cantor.suse.de ([195.135.220.2]:5099 "EHLO mx1.suse.de") by vger.kernel.org with ESMTP id S932205AbWDLUYA (ORCPT ); Wed, 12 Apr 2006 16:24:00 -0400 To: Steven Rostedt Cc: Ingo Molnar , Andrew Morton , Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [RFC] Making percpu module variables have their own memory. References: <1144869739.26133.74.camel@localhost.localdomain> From: Andi Kleen Date: 12 Apr 2006 22:23:58 +0200 In-Reply-To: <1144869739.26133.74.camel@localhost.localdomain> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 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 Steven Rostedt writes: The basic optimization idea looks interesting. But your implementation is quite complicated. The basic problem is that extern declarations and definitions are the same macro. If they weren't one could just use a different macro depending on if MODULE is defined or not and get rid of the type comparisons you do. Since you already need to change a lot of the per CPU definitions how about you just define a separate macro for extern per cpu declarations? And then change the basic macro to do the right thing based on MODULE is set or not. -Andi