Re: softlockups in multi_cpu_stop

Jason Low
2015-03-07T01:53:30Z

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

Yes, this looks more readable.

That while (true) thing was something we recently did for mutexes which
was why I originally had that.

> Also, this "barrier()" now lost the comment:
>
> > + barrier();
>
> so it looks very odd indeed.

Right, we should keep the comment for the barrier().