Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2021-06-21 Thread Segher Boessenkool
Hi! On Mon, Jun 21, 2021 at 04:11:04PM +0200, Christophe Leroy wrote: > Le 19/06/2021 à 17:02, Segher Boessenkool a écrit : > >The point of the twi in the I/O accessors was to make things easier to > >debug if the accesses fail: for the twi insn to complete the load will > >have to have completed

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2021-06-21 Thread Christophe Leroy
Le 19/06/2021 à 17:02, Segher Boessenkool a écrit : On Sat, Jun 19, 2021 at 11:35:34AM +0200, Christophe Leroy wrote: Le 18/06/2021 à 19:26, Mathieu Desnoyers a écrit : - On Jun 18, 2021, at 1:13 PM, Christophe Leroy christophe.le...@csgroup.eu wrote: [...] I don't understand all

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2021-06-19 Thread Segher Boessenkool
On Sat, Jun 19, 2021 at 11:35:34AM +0200, Christophe Leroy wrote: > > > Le 18/06/2021 à 19:26, Mathieu Desnoyers a écrit : > >- On Jun 18, 2021, at 1:13 PM, Christophe Leroy > >christophe.le...@csgroup.eu wrote: > >[...] > >> > >>I don't understand all that complexity to just replace a

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2021-06-19 Thread Christophe Leroy
Le 18/06/2021 à 19:26, Mathieu Desnoyers a écrit : - On Jun 18, 2021, at 1:13 PM, Christophe Leroy christophe.le...@csgroup.eu wrote: [...] I don't understand all that complexity to just replace a simple 'smp_mb__after_unlock_lock()'. #define smp_mb__after_unlock_lock() smp_mb()

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2021-06-18 Thread Mathieu Desnoyers
- On Jun 18, 2021, at 1:13 PM, Christophe Leroy christophe.le...@csgroup.eu wrote: [...] > > I don't understand all that complexity to just replace a simple > 'smp_mb__after_unlock_lock()'. > > #define smp_mb__after_unlock_lock() smp_mb() > #define smp_mb() barrier() > # define

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2021-06-18 Thread Christophe Leroy
Le 29/01/2018 à 21:20, Mathieu Desnoyers a écrit : Allow 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. Threads targeting the same VM but which belong to

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2018-02-05 Thread Mathieu Desnoyers
- On Feb 5, 2018, at 3:22 PM, Ingo Molnar mi...@kernel.org wrote: > * Mathieu Desnoyers wrote: > >> >> +config ARCH_HAS_MEMBARRIER_HOOKS >> +bool > > Yeah, so I have renamed this to ARCH_HAS_MEMBARRIER_CALLBACKS, and propagated > it > through the rest

Re: [PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2018-02-05 Thread Ingo Molnar
* Mathieu Desnoyers wrote: > > +config ARCH_HAS_MEMBARRIER_HOOKS > + bool Yeah, so I have renamed this to ARCH_HAS_MEMBARRIER_CALLBACKS, and propagated it through the rest of the patches. "Callback" is the canonical name, and I also cringe every time I

[PATCH for 4.16 v7 02/11] powerpc: membarrier: Skip memory barrier in switch_mm()

2018-01-29 Thread Mathieu Desnoyers
Allow 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. Threads targeting the same VM but which belong to different thread groups is a tricky case. It has a few