From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756626AbbCGGps (ORCPT ); Sat, 7 Mar 2015 01:45:48 -0500 Received: from g4t3425.houston.hp.com ([15.201.208.53]:20156 "EHLO g4t3425.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbbCGGpr (ORCPT ); Sat, 7 Mar 2015 01:45:47 -0500 Message-ID: <1425710736.2475.369.camel@j-VirtualBox> Subject: Re: softlockups in multi_cpu_stop From: Jason Low To: Davidlohr Bueso Cc: Linus Torvalds , Ingo Molnar , tim.c.chen@linux.intel.com, paulmck@linux.vnet.ibm.com, Sasha Levin , Peter Zijlstra , LKML , Dave Jones , Ming Lei , jason.low2@hp.com Date: Fri, 06 Mar 2015 22:45:36 -0800 In-Reply-To: <1425703470.19505.111.camel@stgolabs.net> 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> <1425702688.2475.363.camel@j-VirtualBox> <1425703470.19505.111.camel@stgolabs.net> 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 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 changelog says that it fixes (locking/rwsem: Avoid deceiving > > lock spinners), though I still haven't seen full confirmation that it > > addresses all of the lockup reports. > > > > ------ > > Subject: [PATCH] rwsem: Avoid spinning when owner is not running > > > > Fixes tip commmit b3fd4f03ca0b (locking/rwsem: Avoid deceiving lock spinners). > > > > When doing optimistic spinning in rwsem, threads should stop spinning when > > the lock owner is not running. While a thread is spinning on owner, if > > the owner reschedules, owner->on_cpu returns false and we stop spinning. > > > > However, commit b3fd4f03ca0b essentially caused the check to get ignored > > because when we break out of the spin loop due to !on_cpu, we continue > > spinning if sem->owner != NULL. > > I would mention the actual effects of the bug, either just a "lockup" > and/or a fragment of the trace. Right, we should mention about the lockup in the changelog. > > Cc: Ming Lei > > Cc: Davidlohr Bueso > > Acked-by: Davidlohr Bueso Thanks!