Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-25 Thread Linus Torvalds
On Tue, Jun 24, 2014 at 11:25 PM, Heiko Carstens wrote: > > Maybe cpu_relax_spin() ? However that doesn't sound much better as well. "cpu_relax_lowlatency()", perhaps? Naming it for what the use is ("relax, but only if you can do it with very low latency") Linus -- To unsubscribe

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-25 Thread Heiko Carstens
On Tue, Jun 24, 2014 at 08:06:55AM -0700, Davidlohr Bueso wrote: > On Mon, 2014-06-23 at 08:58 +0200, Peter Zijlstra wrote: > > While I like the general idea; does anyone have a better name for this? > > So in particular, the difference is that on s390: > > > > cpu_relax()-

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-25 Thread Heiko Carstens
On Tue, Jun 24, 2014 at 08:06:55AM -0700, Davidlohr Bueso wrote: On Mon, 2014-06-23 at 08:58 +0200, Peter Zijlstra wrote: While I like the general idea; does anyone have a better name for this? So in particular, the difference is that on s390: cpu_relax()- yields the

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-25 Thread Linus Torvalds
On Tue, Jun 24, 2014 at 11:25 PM, Heiko Carstens heiko.carst...@de.ibm.com wrote: Maybe cpu_relax_spin() ? However that doesn't sound much better as well. cpu_relax_lowlatency(), perhaps? Naming it for what the use is (relax, but only if you can do it with very low latency) Linus

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-24 Thread Davidlohr Bueso
On Mon, 2014-06-23 at 08:58 +0200, Peter Zijlstra wrote: > On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: > > From: Davidlohr Bueso > > > > The arch_mutex_cpu_relax() function, introduced by 34b133f, is > > hacky and ugly. It was added a few years ago to address the fact > >

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-24 Thread Davidlohr Bueso
On Mon, 2014-06-23 at 08:58 +0200, Peter Zijlstra wrote: On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: From: Davidlohr Bueso davidl...@hp.com The arch_mutex_cpu_relax() function, introduced by 34b133f, is hacky and ugly. It was added a few years ago to address the fact

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Peter Zijlstra
On Mon, Jun 23, 2014 at 12:43:46PM +0530, Vineet Gupta wrote: > Hi Peter, > > On Monday 23 June 2014 12:24 PM, Peter Zijlstra wrote: > > On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: > >> diff --git a/arch/arc/include/asm/processor.h > >> b/arch/arc/include/asm/processor.h >

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Vineet Gupta
Hi Peter, On Monday 23 June 2014 12:24 PM, Peter Zijlstra wrote: > On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: >> diff --git a/arch/arc/include/asm/processor.h >> b/arch/arc/include/asm/processor.h >> index d99f9b3..8e1bf6b 100644 >> --- a/arch/arc/include/asm/processor.h >>

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Peter Zijlstra
On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: > From: Davidlohr Bueso > > The arch_mutex_cpu_relax() function, introduced by 34b133f, is > hacky and ugly. It was added a few years ago to address the fact > that common cpu_relax() calls include yielding on s390, and thus >

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Peter Zijlstra
On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: > diff --git a/arch/arc/include/asm/processor.h > b/arch/arc/include/asm/processor.h > index d99f9b3..8e1bf6b 100644 > --- a/arch/arc/include/asm/processor.h > +++ b/arch/arc/include/asm/processor.h > @@ -62,6 +62,8 @@ unsigned long

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Peter Zijlstra
On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index d99f9b3..8e1bf6b 100644 --- a/arch/arc/include/asm/processor.h +++ b/arch/arc/include/asm/processor.h @@ -62,6 +62,8 @@ unsigned long

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Peter Zijlstra
On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: From: Davidlohr Bueso davidl...@hp.com The arch_mutex_cpu_relax() function, introduced by 34b133f, is hacky and ugly. It was added a few years ago to address the fact that common cpu_relax() calls include yielding on s390, and

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Vineet Gupta
Hi Peter, On Monday 23 June 2014 12:24 PM, Peter Zijlstra wrote: On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index d99f9b3..8e1bf6b 100644 --- a/arch/arc/include/asm/processor.h +++

Re: [PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-23 Thread Peter Zijlstra
On Mon, Jun 23, 2014 at 12:43:46PM +0530, Vineet Gupta wrote: Hi Peter, On Monday 23 June 2014 12:24 PM, Peter Zijlstra wrote: On Fri, Jun 20, 2014 at 11:21:13AM -0700, Davidlohr Bueso wrote: diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index

[PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-20 Thread Davidlohr Bueso
From: Davidlohr Bueso The arch_mutex_cpu_relax() function, introduced by 34b133f, is hacky and ugly. It was added a few years ago to address the fact that common cpu_relax() calls include yielding on s390, and thus impact the optimistic spinning functionality of mutexes. Nowadays we use this

[PATCH] arch,locking: Ciao arch_mutex_cpu_relax()

2014-06-20 Thread Davidlohr Bueso
From: Davidlohr Bueso davidl...@hp.com The arch_mutex_cpu_relax() function, introduced by 34b133f, is hacky and ugly. It was added a few years ago to address the fact that common cpu_relax() calls include yielding on s390, and thus impact the optimistic spinning functionality of mutexes. Nowadays