From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751226AbWDPHC0 (ORCPT ); Sun, 16 Apr 2006 03:02:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751233AbWDPHC0 (ORCPT ); Sun, 16 Apr 2006 03:02:26 -0400 Received: from ozlabs.org ([203.10.76.45]:4796 "EHLO ozlabs.org") by vger.kernel.org with ESMTP id S1751226AbWDPHCZ (ORCPT ); Sun, 16 Apr 2006 03:02:25 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17473.60411.690686.714791@cargo.ozlabs.ibm.com> Date: Sun, 16 Apr 2006 17:02:19 +1000 From: Paul Mackerras To: Steven Rostedt Cc: Nick Piggin , LKML , Andrew Morton , Linus Torvalds , Ingo Molnar , Thomas Gleixner , Andi Kleen , Martin Mares , bjornw@axis.com, schwidefsky@de.ibm.com, benedict.gaster@superh.com, lethal@linux-sh.org, Chris Zankel , Marc Gauthier , Joe Taylor , David Mosberger-Tang , rth@twiddle.net, spyro@f2s.com, starvik@axis.com, tony.luck@intel.com, linux-ia64@vger.kernel.org, ralf@linux-mips.org, linux-mips@linux-mips.org, grundler@parisc-linux.org, parisc-linux@parisc-linux.org, linuxppc-dev@ozlabs.org, linux390@de.ibm.com, davem@davemloft.net, rusty@rustcorp.com.au Subject: Re: [PATCH 00/05] robust per_cpu allocation for modules In-Reply-To: References: <1145049535.1336.128.camel@localhost.localdomain> <4440855A.7040203@yahoo.com.au> <4441B02D.4000405@yahoo.com.au> X-Mailer: VM 7.19 under Emacs 21.4.1 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Steven Rostedt writes: > So now I'm asking for advice on some ideas that can be a work around to > keep the robustness and speed. Ideally, what I'd like to do on powerpc is to dedicate one register to storing a per-cpu base address or offset, and be able to resolve the offset at link time, so that per-cpu variable accesses just become a register + offset memory access. (For modules, "link time" would be module load time.) We *might* be able to use some of the infrastructure that was put into gcc and binutils to support TLS (thread local storage) to achieve this. (See http://people.redhat.com/drepper/tls.pdf for some of the details of that.) Also, I've added Rusty Russell to the cc list, since he designed the per-cpu variable stuff in the first place, and would be able to explain the trade-offs that led to the PERCPU_ENOUGH_ROOM thing. (I think you're discovering them as you go, though. :) Paul.