From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030628AbbKDPgz (ORCPT ); Wed, 4 Nov 2015 10:36:55 -0500 Received: from casper.infradead.org ([85.118.1.10]:53229 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932491AbbKDPgx (ORCPT ); Wed, 4 Nov 2015 10:36:53 -0500 Date: Wed, 4 Nov 2015 16:36:51 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Dave Jones , Linux Kernel , Ingo Molnar , Stephane Eranian , Andi Kleen Subject: Re: perf related lockdep bug Message-ID: <20151104153651.GC11639@twins.programming.kicks-ass.net> References: <20151104051717.GA6098@codemonkey.org.uk> <20151104102151.GG17308@twins.programming.kicks-ass.net> <20151104102800.GZ11639@twins.programming.kicks-ass.net> <20151104105010.GA11639@twins.programming.kicks-ass.net> <20151104134838.GR29027@linux.vnet.ibm.com> <20151104142058.GX3604@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151104142058.GX3604@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 04, 2015 at 03:20:58PM +0100, Peter Zijlstra wrote: > On Wed, Nov 04, 2015 at 05:48:38AM -0800, Paul E. McKenney wrote: > > This problem is caused by the IPI handler interrupting the RCU read-side > > critical section. One way to prevent the IPI from doing this is to > > disable interrupts across the RCU read-side critical section instead > > of merely disabling preemption. This is a reasonable approach given > > that acquiring the scheduler locks is going to disable interrupts > > in any case. > > > > The (untested) patch below takes this approach. > > > > Thoughts? > > Yes, this should work, but now I worry I need to go audit all of perf > and sched for this :/ I can't find any other sites just now, so let me queue this. I also had a brief look if you used any other locks under rnp->lock, but aside from the printk and sched things it seems clean.