Re: [patch 2/3] spinlock: allow inlined spinlocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Heiko Carstens <heiko.carstens@xxxxxxxxxx> wrote:

> On Sun, Aug 16, 2009 at 10:48:31PM +0200, Ingo Molnar wrote:
> > * Heiko Carstens <heiko.carstens@xxxxxxxxxx> wrote:
> > > On Sun, Aug 16, 2009 at 08:06:31PM +0200, Ingo Molnar wrote:
> > > > * Heiko Carstens <heiko.carstens@xxxxxxxxxx> 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. [...]
> > 
> > Well, if you dont know the functions you want to inline, how 
> > will you make intelligent use of this facility then in s390?
> 
> What I tried to say: in general we want to have all locking 
> functions inlined. This is because all our measurements show if 
> anything gets inlined performance improves. This is even true for 
> large functions.
> 
> > Btw., i just noticed that s390 has CONFIG_PREEMPT turned on by 
> > default in its defconfig. Have you made your measurements with 
> > CONFIG_PREEMPT? If yes then the current inlining rules in 
> > spinlock.h will turn all the locking APIs into functions.
> 
> All measurements were done with CONFIG_PREEMPT off.

ok.

( Btw., regardless of this patch-set, i suspect you _really_ want 
  compiler help for that - one with a global scope and which can go 
  inline even larger functions, and even if they were declared 
  global in the kernel. )

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux