From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753243AbbCGBxa (ORCPT ); Fri, 6 Mar 2015 20:53:30 -0500 Received: from g4t3427.houston.hp.com ([15.201.208.55]:39673 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbbCGBx3 (ORCPT ); Fri, 6 Mar 2015 20:53:29 -0500 Message-ID: <1425693206.2475.315.camel@j-VirtualBox> Subject: Re: softlockups in multi_cpu_stop From: Jason Low To: Linus Torvalds Cc: Davidlohr Bueso , Ingo Molnar , Sasha Levin , Peter Zijlstra , LKML , Dave Jones , jason.low2@hp.com Date: Fri, 06 Mar 2015 17:53:26 -0800 In-Reply-To: References: <54F41516.6060608@oracle.com> <54F98F1F.3080107@oracle.com> <20150306123233.GA9972@gmail.com> <1425662342.19505.41.camel@stgolabs.net> <1425668223.2475.94.camel@j-VirtualBox> <1425670188.2475.113.camel@j-VirtualBox> <1425676346.2475.135.camel@j-VirtualBox> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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->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().