From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Carstens Subject: Re: [patch 2/3] spinlock: allow inlined spinlocks Date: Sun, 16 Aug 2009 20:44:58 +0200 Message-ID: <20090816184458.GC5808@osiris.boeblingen.de.ibm.com> References: <20090814125801.881618121@de.ibm.com> <20090814125857.181021997@de.ibm.com> <20090816175750.GA5808@osiris.boeblingen.de.ibm.com> <20090816180631.GA23448@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mtagate3.de.ibm.com ([195.212.29.152]:42256 "EHLO mtagate3.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbZHPSpI (ORCPT ); Sun, 16 Aug 2009 14:45:08 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.14.3/8.13.8) with ESMTP id n7GIix66041078 for ; Sun, 16 Aug 2009 18:44:59 GMT Received: from d12av03.megacenter.de.ibm.com (d12av03.megacenter.de.ibm.com [9.149.165.213]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7GIixgQ2330724 for ; Sun, 16 Aug 2009 20:44:59 +0200 Received: from d12av03.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av03.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7GIiwlW000666 for ; Sun, 16 Aug 2009 20:44:59 +0200 Content-Disposition: inline In-Reply-To: <20090816180631.GA23448@elte.hu> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ingo Molnar Cc: Andrew Morton , Linus Torvalds , Peter Zijlstra , linux-arch@vger.kernel.org, Martin Schwidefsky , Arnd Bergmann , Horst Hartmann , Christian Ehrhardt , Nick Piggin On Sun, Aug 16, 2009 at 08:06:31PM +0200, Ingo Molnar wrote: > * Heiko Carstens wrote: > > > #define __spin_lock_is_small > > > > +unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) > > > + __acquires(lock); > > > + > > > +#ifdef __spin_lock_is_small > > > +#define _spin_lock(lock) __spin_lock(lock) > > > +#else > > > +void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); > > > +#endif > > Dunno - i'm somewhat wary of introducing a 2^28 variability here. > (although the number of real variations is much lower - but still). > > What's the current situation on s390, precisely which of the 28 lock > functions are a win to be inlined and which ones are a loss? Do you > have a list/table perhaps? No list unfortunately. However, the variants we really care about are only the spin_locks. The *try_lock variants are also not that important. So we end up with eight ifdefs (spin_lock/bh/irq/irq_save + unlock). I'll change the patches according to Linus' comments and send them again.