Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-20 Thread Nicholas Piggin
On Tue, 20 Sep 2016 14:35:45 +0200 Christian Borntraeger wrote: > On 09/20/2016 02:27 PM, Nicholas Piggin wrote: > > On Tue, 20 Sep 2016 13:19:30 +0200 > > Christian Borntraeger wrote: > > > >> On 09/16/2016 10:57 AM, Nicholas Piggin wrote: >

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-20 Thread Christian Borntraeger
On 09/20/2016 02:27 PM, Nicholas Piggin wrote: > On Tue, 20 Sep 2016 13:19:30 +0200 > Christian Borntraeger wrote: > >> On 09/16/2016 10:57 AM, Nicholas Piggin wrote: >>> Implementing busy wait loops with cpu_relax() in callers poses >>> some difficulties for powerpc. >>>

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-20 Thread Nicholas Piggin
On Tue, 20 Sep 2016 13:19:30 +0200 Christian Borntraeger wrote: > On 09/16/2016 10:57 AM, Nicholas Piggin wrote: > > Implementing busy wait loops with cpu_relax() in callers poses > > some difficulties for powerpc. > > > > First, we want to put our SMT thread into a low

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-20 Thread Christian Borntraeger
On 09/16/2016 10:57 AM, Nicholas Piggin wrote: > Implementing busy wait loops with cpu_relax() in callers poses > some difficulties for powerpc. > > First, we want to put our SMT thread into a low priority mode for the > duration of the loop, but then return to normal priority after exiting > the

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-19 Thread Nicholas Piggin
On Mon, 19 Sep 2016 17:45:52 +1000 Balbir Singh wrote: > On 16/09/16 18:57, Nicholas Piggin wrote: > > Implementing busy wait loops with cpu_relax() in callers poses > > some difficulties for powerpc. > > > > First, we want to put our SMT thread into a low priority mode

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-19 Thread Balbir Singh
On 16/09/16 18:57, Nicholas Piggin wrote: > Implementing busy wait loops with cpu_relax() in callers poses > some difficulties for powerpc. > > First, we want to put our SMT thread into a low priority mode for the > duration of the loop, but then return to normal priority after exiting > the

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-18 Thread Aneesh Kumar K.V
> diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h > index 3b5bafc..695743c 100644 > --- a/include/linux/bit_spinlock.h > +++ b/include/linux/bit_spinlock.h > @@ -25,9 +25,8 @@ static inline void bit_spin_lock(int bitnum, unsigned long > *addr) > #if defined(CONFIG_SMP)

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-16 Thread Nicholas Piggin
On Fri, 16 Sep 2016 22:06:35 +1000 Nicholas Piggin wrote: > On Fri, 16 Sep 2016 11:57:37 + > David Laight wrote: > > > From: Nicholas Piggin > > > Sent: 16 September 2016 12:52 > > > On Fri, 16 Sep 2016 11:30:58 + > > > David Laight

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-16 Thread Nicholas Piggin
On Fri, 16 Sep 2016 11:57:37 + David Laight wrote: > From: Nicholas Piggin > > Sent: 16 September 2016 12:52 > > On Fri, 16 Sep 2016 11:30:58 + > > David Laight wrote: > > > > > From: Nicholas Piggin > > > > Sent: 16 September 2016

RE: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-16 Thread David Laight
From: Nicholas Piggin > Sent: 16 September 2016 12:52 > On Fri, 16 Sep 2016 11:30:58 + > David Laight wrote: > > > From: Nicholas Piggin > > > Sent: 16 September 2016 09:58 > > > Implementing busy wait loops with cpu_relax() in callers poses > > > some difficulties

Re: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-16 Thread Nicholas Piggin
On Fri, 16 Sep 2016 11:30:58 + David Laight wrote: > From: Nicholas Piggin > > Sent: 16 September 2016 09:58 > > Implementing busy wait loops with cpu_relax() in callers poses > > some difficulties for powerpc. > > > > First, we want to put our SMT thread into a low

RE: [PATCH][RFC] Implement arch primitives for busywait loops

2016-09-16 Thread David Laight
From: Nicholas Piggin > Sent: 16 September 2016 09:58 > Implementing busy wait loops with cpu_relax() in callers poses > some difficulties for powerpc. > > First, we want to put our SMT thread into a low priority mode for the > duration of the loop, but then return to normal priority after

[PATCH][RFC] Implement arch primitives for busywait loops

2016-09-16 Thread Nicholas Piggin
Implementing busy wait loops with cpu_relax() in callers poses some difficulties for powerpc. First, we want to put our SMT thread into a low priority mode for the duration of the loop, but then return to normal priority after exiting the loop. Dependong on the CPU design, 'HMT_low() ;