From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: lockdep splat in CPU hotplug Date: Wed, 22 Oct 2014 14:09:43 -0700 Message-ID: <20141022210943.GL4977@linux.vnet.ibm.com> References: <20141022143837.GW4977@linux.vnet.ibm.com> <20141022165433.GA22874@linux.vnet.ibm.com> <20141022185712.GA9570@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from e37.co.us.ibm.com ([32.97.110.158]:59985 "EHLO e37.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932352AbaJVVJt (ORCPT ); Wed, 22 Oct 2014 17:09:49 -0400 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 22 Oct 2014 15:09:48 -0600 Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Jiri Kosina Cc: Peter Zijlstra , Ingo Molnar , "Rafael J. Wysocki" , Pavel Machek , Steven Rostedt , Dave Jones , Daniel Lezcano , Nicolas Pitre , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org On Wed, Oct 22, 2014 at 10:57:25PM +0200, Jiri Kosina wrote: > On Wed, 22 Oct 2014, Paul E. McKenney wrote: > > > rcu: More on deadlock between CPU hotplug and expedited grace periods > > > > Commit dd56af42bd82 (rcu: Eliminate deadlock between CPU hotplug and > > expedited grace periods) was incomplete. Although it did eliminate > > deadlocks involving synchronize_sched_expedited()'s acquisition of > > cpu_hotplug.lock via get_online_cpus(), it did nothing about the similar > > deadlock involving acquisition of this same lock via put_online_cpus(). > > This deadlock became apparent with testing involving hibernation. > > > > This commit therefore changes put_online_cpus() acquisition of this lock > > to be conditional, and increments a new cpu_hotplug.puts_pending field > > in case of acquisition failure. Then cpu_hotplug_begin() checks for this > > new field being non-zero, and applies any changes to cpu_hotplug.refcount. > > > > Yes, this works. FWIW, please feel free to add > > Reported-and-tested-by: Jiri Kosina > > once merging it. Done, and thank you for both the bug report and the testing! > Why lockdep produced such an incomplete stacktrace still remains > unexplained. On that, I must defer to people more familiar with stack frames. Thanx, Paul > Thanks, > > -- > Jiri Kosina > SUSE Labs >