linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: x86: spinlock ops are always-inlined
       [not found] <200804181847.m3IIlLPr032254@hera.kernel.org>
@ 2008-04-18 21:31 ` Andrew Morton
  2008-04-21 14:22   ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2008-04-18 21:31 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linux Kernel Mailing List

On Fri, 18 Apr 2008 18:47:21 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fda20f146d5d217684ffbc37c6b6c5f82c2dffd
> Commit:     7fda20f146d5d217684ffbc37c6b6c5f82c2dffd
> Parent:     d93c870bad38e8daaaf9f7e900a13431f24becbb
> Author:     Ingo Molnar <mingo@elte.hu>
> AuthorDate: Fri Feb 29 10:29:38 2008 +0100
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Thu Apr 17 17:41:29 2008 +0200
> 
>     x86: spinlock ops are always-inlined
>     
>     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  include/asm-x86/spinlock.h |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h
> index 47dfe26..bc6376f 100644
> --- a/include/asm-x86/spinlock.h
> +++ b/include/asm-x86/spinlock.h
> @@ -78,7 +78,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
>  	return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1;
>  }
>  
> -static inline void __raw_spin_lock(raw_spinlock_t *lock)
> +static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)

What was the reason for making this change?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: x86: spinlock ops are always-inlined
  2008-04-18 21:31 ` x86: spinlock ops are always-inlined Andrew Morton
@ 2008-04-21 14:22   ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-04-21 14:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel Mailing List


* Andrew Morton <akpm@linux-foundation.org> wrote:

> On Fri, 18 Apr 2008 18:47:21 GMT
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
> 
> > Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fda20f146d5d217684ffbc37c6b6c5f82c2dffd
> > Commit:     7fda20f146d5d217684ffbc37c6b6c5f82c2dffd
> > Parent:     d93c870bad38e8daaaf9f7e900a13431f24becbb
> > Author:     Ingo Molnar <mingo@elte.hu>
> > AuthorDate: Fri Feb 29 10:29:38 2008 +0100
> > Committer:  Ingo Molnar <mingo@elte.hu>
> > CommitDate: Thu Apr 17 17:41:29 2008 +0200
> > 
> >     x86: spinlock ops are always-inlined
> >     
> >     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > ---
> >  include/asm-x86/spinlock.h |   12 ++++++------
> >  1 files changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/include/asm-x86/spinlock.h b/include/asm-x86/spinlock.h
> > index 47dfe26..bc6376f 100644
> > --- a/include/asm-x86/spinlock.h
> > +++ b/include/asm-x86/spinlock.h
> > @@ -78,7 +78,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock)
> >  	return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1;
> >  }
> >  
> > -static inline void __raw_spin_lock(raw_spinlock_t *lock)
> > +static __always_inline void __raw_spin_lock(raw_spinlock_t *lock)
> 
> What was the reason for making this change?

has no effect on current kernels (which always inline), but it breaks 
with an upcoming feature, CONFIG_OPTIMIZE_INLINING=y that lets gcc 
decide whether to inline or not. (should have mentioned this in the 
changelog, sorry)

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-21 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200804181847.m3IIlLPr032254@hera.kernel.org>
2008-04-18 21:31 ` x86: spinlock ops are always-inlined Andrew Morton
2008-04-21 14:22   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).