Re: [PATCH][2.6] Completely out of line spinlocks / i386

From: Zwane Mwaikambo
Date: Sun Aug 08 2004 - 00:14:28 EST


On Sat, 7 Aug 2004, Linus Torvalds wrote:

> On Sun, 8 Aug 2004, Zwane Mwaikambo wrote:
> >
> > Pulled from the -tiny tree,
>
> Hmm.
>
> You really shouldn't use %ebx for flags. Use %edx instead.
>
> %ebx is call-save, so by forcing gcc to use %edx, you're guaranteeing that
> the compiler has to save/restore the register even for a simple function
> that wouldn't otherwise need it.

Thanks i'll change that.

> Also, why export the "failed" ones:

Actually that's now dead code since i had two variants but trimmed it, the
other had the fast path acquisition code inline and called the failed
procedures on contention. It'll have to go.

> > +#ifdef CONFIG_COOL_SPINLOCK
> > +extern void asmlinkage __spin_lock_failed(spinlock_t *);
> > +extern void asmlinkage __spin_lock_failed_flags(spinlock_t *, unsigned long);
> > +extern void asmlinkage __spin_lock_loop(spinlock_t *);
> > +extern void asmlinkage __spin_lock_loop_flags(spinlock_t *, unsigned long);
> > +EXPORT_SYMBOL(__spin_lock_failed);
> > +EXPORT_SYMBOL(__spin_lock_failed_flags);
> > +EXPORT_SYMBOL(__spin_lock_loop);
> > +EXPORT_SYMBOL(__spin_lock_loop_flags);
> > +#endif
>
> that looks just broken.

_raw_spin_lock will have the symbol __spin_lock_loop{,_flags} when used in
symbols, modules won't load otherwise.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/