Re: [PATCH/RFC 2/3] s390: improve wait logic of stop_machine

2019-06-11 Thread Heiko Carstens
On Tue, Jun 11, 2019 at 11:15:46AM +0200, Peter Zijlstra wrote: > On Sat, Jun 08, 2019 at 01:08:52PM +0200, Heiko Carstens wrote: > > --- a/arch/s390/kernel/processor.c > > +++ b/arch/s390/kernel/processor.c > > @@ -31,6 +31,7 @@ struct cpu_info { > > }; > > > > static DEFINE_PER_CPU(struct

Re: [PATCH/RFC 2/3] s390: improve wait logic of stop_machine

2019-06-11 Thread Peter Zijlstra
On Sat, Jun 08, 2019 at 01:08:52PM +0200, Heiko Carstens wrote: > --- a/arch/s390/kernel/processor.c > +++ b/arch/s390/kernel/processor.c > @@ -31,6 +31,7 @@ struct cpu_info { > }; > > static DEFINE_PER_CPU(struct cpu_info, cpu_info); > +static DEFINE_PER_CPU(int, cpu_relax_retry); > >

[PATCH/RFC 2/3] s390: improve wait logic of stop_machine

2019-06-08 Thread Heiko Carstens
From: Martin Schwidefsky The stop_machine loop to advance the state machine and to wait for all affected CPUs to check-in calls cpu_relax_yield in a tight loop until the last missing CPUs acknowledged the state transition. On a virtual system where not all logical CPUs are backed by real CPUs