Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Sat, 2015-03-07 at 13:54 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 12:31 PM, Jason Low wrote: > > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > Cc: Ming Lei > > Cc: Davidlohr Bueso > > Signed-off-by: Jason Low > > Reported-and-tested-by: Ming Lei Thanks! > > static noinl

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Fri, 2015-03-06 at 20:44 -0800, Davidlohr Bueso wrote: > On Fri, 2015-03-06 at 20:31 -0800, Jason Low wrote: > > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > > > Just in case, here's the updated patch which addresses Linus's comments > > and with a changelog. > > > > Note: The chang

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Sat, Mar 7, 2015 at 12:31 PM, Jason Low wrote: > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > Just in case, here's the updated patch which addresses Linus's comments > and with a changelog. > > Note: The changelog says that it fixes (locking/rwsem: Avoid deceiving > lock spinners), t

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Fri, 2015-03-06 at 20:31 -0800, Jason Low wrote: > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > Just in case, here's the updated patch which addresses Linus's comments > and with a changelog. > > Note: The changelog says that it fixes (locking/rwsem: Avoid deceiving > lock spinners)

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: Just in case, here's the updated patch which addresses Linus's comments and with a changelog. Note: The changelog says that it fixes (locking/rwsem: Avoid deceiving lock spinners), though I still haven't seen full confirmation that it addresses

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Sat, 2015-03-07 at 11:39 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 11:17 AM, Jason Low wrote: > > On Sat, 2015-03-07 at 11:08 +0800, Ming Lei wrote: > >> On Sat, Mar 7, 2015 at 10:56 AM, Jason Low wrote: > >> > On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: > >> >> On Sat, Mar 7, 201

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Sat, 2015-03-07 at 11:19 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 11:10 AM, Davidlohr Bueso wrote: > > On Sat, 2015-03-07 at 10:55 +0800, Ming Lei wrote: > >> On Sat, Mar 7, 2015 at 10:29 AM, Davidlohr Bueso wrote: > >> > On Fri, 2015-03-06 at 18:26 -0800, Davidlohr Bueso wrote: > >> >>

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Sat, Mar 7, 2015 at 11:17 AM, Jason Low wrote: > On Sat, 2015-03-07 at 11:08 +0800, Ming Lei wrote: >> On Sat, Mar 7, 2015 at 10:56 AM, Jason Low wrote: >> > On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: >> >> On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso >> >> wrote: >> >> > On Sat,

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Sat, Mar 7, 2015 at 11:10 AM, Davidlohr Bueso wrote: > On Sat, 2015-03-07 at 10:55 +0800, Ming Lei wrote: >> On Sat, Mar 7, 2015 at 10:29 AM, Davidlohr Bueso wrote: >> > On Fri, 2015-03-06 at 18:26 -0800, Davidlohr Bueso wrote: >> >> That's not what this is about. New lock _owners_ need to wor

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Sat, 2015-03-07 at 11:08 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 10:56 AM, Jason Low wrote: > > On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: > >> On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso wrote: > >> > On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: > >> >> On Fri, 06 M

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Sat, 2015-03-07 at 11:08 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 10:56 AM, Jason Low wrote: > > On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: > >> On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso wrote: > >> > On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: > >> >> On Fri, 06 M

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Sat, 2015-03-07 at 10:55 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 10:29 AM, Davidlohr Bueso wrote: > > On Fri, 2015-03-06 at 18:26 -0800, Davidlohr Bueso wrote: > >> That's not what this is about. New lock _owners_ need to worry about > >

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Sat, Mar 7, 2015 at 10:56 AM, Jason Low wrote: > On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: >> On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso wrote: >> > On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: >> >> On Fri, 06 Mar 2015 14:15:37 -0800 >> >> Davidlohr Bueso wrote: >> >> >>

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso wrote: > > On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: > >> On Fri, 06 Mar 2015 14:15:37 -0800 > >> Davidlohr Bueso wrote: > >> > >> > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: >

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Sat, Mar 7, 2015 at 10:29 AM, Davidlohr Bueso wrote: > On Fri, 2015-03-06 at 18:26 -0800, Davidlohr Bueso wrote: >> That's not what this is about. New lock _owners_ need to worry about > ^^^ make that "need not" Sorry, could you explain a b

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Fri, 2015-03-06 at 18:26 -0800, Davidlohr Bueso wrote: > That's not what this is about. New lock _owners_ need to worry about ^^^ make that "need not" -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Sat, 2015-03-07 at 10:10 +0800, Ming Lei wrote: > On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso wrote: > > On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: > >> On Fri, 06 Mar 2015 14:15:37 -0800 > >> Davidlohr Bueso wrote: > >> > >> > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: >

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Sat, Mar 7, 2015 at 10:07 AM, Davidlohr Bueso wrote: > On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: >> On Fri, 06 Mar 2015 14:15:37 -0800 >> Davidlohr Bueso wrote: >> >> > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: >> > > In owner_running() there are 2 conditions that would make

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Sat, 2015-03-07 at 09:55 +0800, Ming Lei wrote: > On Fri, 06 Mar 2015 14:15:37 -0800 > Davidlohr Bueso wrote: > > > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > > In owner_running() there are 2 conditions that would make it return > > > false: if the owner changed or if the owner is

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Fri, 2015-03-06 at 14:15 -0800, Davidlohr Bueso wrote: > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > In owner_running() there are 2 conditions that would make it return > > false: if the owner changed or if the owner is not running. However, > > that patch continues spinning if there

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Ming Lei
On Fri, 06 Mar 2015 14:15:37 -0800 Davidlohr Bueso wrote: > On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > > In owner_running() there are 2 conditions that would make it return > > false: if the owner changed or if the owner is not running. However, > > that patch continues spinning if the

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Fri, 2015-03-06 at 13:24 -0800, Linus Torvalds wrote: > On Fri, Mar 6, 2015 at 1:12 PM, Jason Low wrote: > > > > + while (true) { > > + if (sem->owner != owner) > > + break; > > That looks *really* odd. > > Why is this not > > while (sem->own

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Davidlohr Bueso
On Fri, 2015-03-06 at 13:12 -0800, Jason Low wrote: > In owner_running() there are 2 conditions that would make it return > false: if the owner changed or if the owner is not running. However, > that patch continues spinning if there is a "new owner" but it does not > take into account that we may

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Linus Torvalds
On Fri, Mar 6, 2015 at 1:12 PM, Jason Low wrote: > > + while (true) { > + if (sem->owner != owner) > + break; That looks *really* odd. Why is this not while (sem->owner == owner) { Also, this "barrier()" now lost the comment: > +

Re: softlockups in multi_cpu_stop

2015-03-06 Thread Jason Low
On Fri, 2015-03-06 at 11:29 -0800, Jason Low wrote: > Hi Linus, > > Agreed, this is an issue we need to address, though we're just trying to > figure out if the change to rwsem_can_spin_on_owner() in "commit: > 37e9562453b" is really the one that's causing the issue. > > For example, it looks lik