Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Peter Zijlstra
On Fri, Sep 29, 2017 at 09:38:53PM +1000, Nicholas Piggin wrote: > Not really. There is some ability to hold onto a line for a time, but > there is no way to starve them, let alone starve hundreds of other > CPUs. They will request the cacheline exclusive and eventually get it. OK, hardware

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Peter Zijlstra
On Fri, Sep 29, 2017 at 09:38:53PM +1000, Nicholas Piggin wrote: > Not really. There is some ability to hold onto a line for a time, but > there is no way to starve them, let alone starve hundreds of other > CPUs. They will request the cacheline exclusive and eventually get it. OK, hardware

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Nicholas Piggin
On Fri, 29 Sep 2017 12:31:31 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 02:27:57AM +1000, Nicholas Piggin wrote: > > > The biggest power boxes are more tightly coupled than those big > > SGI systems, but even so just plodding along taking and releasing > > locks

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Nicholas Piggin
On Fri, 29 Sep 2017 12:31:31 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 02:27:57AM +1000, Nicholas Piggin wrote: > > > The biggest power boxes are more tightly coupled than those big > > SGI systems, but even so just plodding along taking and releasing > > locks in turn would be fine

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Peter Zijlstra
On Fri, Sep 29, 2017 at 02:27:57AM +1000, Nicholas Piggin wrote: > The biggest power boxes are more tightly coupled than those big > SGI systems, but even so just plodding along taking and releasing > locks in turn would be fine on those SGI ones as well really. Not DoS > level. This is not a

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Peter Zijlstra
On Fri, Sep 29, 2017 at 02:27:57AM +1000, Nicholas Piggin wrote: > The biggest power boxes are more tightly coupled than those big > SGI systems, but even so just plodding along taking and releasing > locks in turn would be fine on those SGI ones as well really. Not DoS > level. This is not a

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Mathieu Desnoyers
- On Sep 28, 2017, at 12:16 PM, Nicholas Piggin npig...@gmail.com wrote: > On Thu, 28 Sep 2017 15:29:50 + (UTC) > Mathieu Desnoyers wrote: > >> - On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: >> >> > On Thu, 28 Sep 2017

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Mathieu Desnoyers
- On Sep 28, 2017, at 12:16 PM, Nicholas Piggin npig...@gmail.com wrote: > On Thu, 28 Sep 2017 15:29:50 + (UTC) > Mathieu Desnoyers wrote: > >> - On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: >> >> > On Thu, 28 Sep 2017 13:31:36 + (UTC) >> > Mathieu

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 17:51:15 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 01:01:12AM +1000, Nicholas Piggin wrote: > > That's fine. If a user is not bound to a subset of CPUs, they could > > also cause disturbances with other syscalls and faults, taking locks, > >

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 17:51:15 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 01:01:12AM +1000, Nicholas Piggin wrote: > > That's fine. If a user is not bound to a subset of CPUs, they could > > also cause disturbances with other syscalls and faults, taking locks, > > causing tlb flushes

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 15:29:50 + (UTC) Mathieu Desnoyers wrote: > - On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: > > > On Thu, 28 Sep 2017 13:31:36 + (UTC) > > Mathieu Desnoyers wrote: > > >

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 15:29:50 + (UTC) Mathieu Desnoyers wrote: > - On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: > > > On Thu, 28 Sep 2017 13:31:36 + (UTC) > > Mathieu Desnoyers wrote: > > > >> - On Sep 27, 2017, at 9:04 AM, Nicholas Piggin

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Peter Zijlstra
On Fri, Sep 29, 2017 at 01:01:12AM +1000, Nicholas Piggin wrote: > That's fine. If a user is not bound to a subset of CPUs, they could > also cause disturbances with other syscalls and faults, taking locks, > causing tlb flushes and IPIs and things. So on the big SGI class machines we've had

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Peter Zijlstra
On Fri, Sep 29, 2017 at 01:01:12AM +1000, Nicholas Piggin wrote: > That's fine. If a user is not bound to a subset of CPUs, they could > also cause disturbances with other syscalls and faults, taking locks, > causing tlb flushes and IPIs and things. So on the big SGI class machines we've had

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Mathieu Desnoyers
- On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: > On Thu, 28 Sep 2017 13:31:36 + (UTC) > Mathieu Desnoyers wrote: > >> - On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: >> >> > On Tue, 26 Sep 2017

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Mathieu Desnoyers
- On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: > On Thu, 28 Sep 2017 13:31:36 + (UTC) > Mathieu Desnoyers wrote: > >> - On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: >> >> > On Tue, 26 Sep 2017 20:43:28 + (UTC) >> > Mathieu

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 13:31:36 + (UTC) Mathieu Desnoyers wrote: > - On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: > > > On Tue, 26 Sep 2017 20:43:28 + (UTC) > > Mathieu Desnoyers wrote: > > >

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 13:31:36 + (UTC) Mathieu Desnoyers wrote: > - On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: > > > On Tue, 26 Sep 2017 20:43:28 + (UTC) > > Mathieu Desnoyers wrote: > > > >> - On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers > >>

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Mathieu Desnoyers
- On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: > On Tue, 26 Sep 2017 20:43:28 + (UTC) > Mathieu Desnoyers wrote: > >> - On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers >> mathieu.desnoy...@efficios.com wrote: >> >> > Provide a

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Mathieu Desnoyers
- On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: > On Tue, 26 Sep 2017 20:43:28 + (UTC) > Mathieu Desnoyers wrote: > >> - On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers >> mathieu.desnoy...@efficios.com wrote: >> >> > Provide a new command allowing processes

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-27 Thread Nicholas Piggin
On Tue, 26 Sep 2017 20:43:28 + (UTC) Mathieu Desnoyers wrote: > - On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > > > Provide a new command allowing processes to register their intent to use > > the private

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-27 Thread Nicholas Piggin
On Tue, 26 Sep 2017 20:43:28 + (UTC) Mathieu Desnoyers wrote: > - On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > > > Provide a new command allowing processes to register their intent to use > > the private expedited command. > > > > I

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-26 Thread Mathieu Desnoyers
- On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > Provide a new command allowing processes to register their intent to use > the private expedited command. > I missed a few maintainers that should have been CC'd. Adding them now. This patch is aimed

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-26 Thread Mathieu Desnoyers
- On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > Provide a new command allowing processes to register their intent to use > the private expedited command. > I missed a few maintainers that should have been CC'd. Adding them now. This patch is aimed

[PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-26 Thread Mathieu Desnoyers
Provide a new command allowing processes to register their intent to use the private expedited command. This allows PowerPC to skip the full memory barrier in switch_mm(), and only issue the barrier when scheduling into a task belonging to a process that has registered to use expedited private.

[PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-26 Thread Mathieu Desnoyers
Provide a new command allowing processes to register their intent to use the private expedited command. This allows PowerPC to skip the full memory barrier in switch_mm(), and only issue the barrier when scheduling into a task belonging to a process that has registered to use expedited private.