Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbdLSQqc (ORCPT ); Tue, 19 Dec 2017 11:46:32 -0500 Received: from merlin.infradead.org ([205.233.59.134]:58792 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751554AbdLSQq1 (ORCPT ); Tue, 19 Dec 2017 11:46:27 -0500 Date: Tue, 19 Dec 2017 17:46:19 +0100 From: Peter Zijlstra To: Dhaval Giani Cc: Steven Rostedt , LKML , Ingo Molnar , Thomas Gleixner , Andrew Morton Subject: Re: [PATCH] lockdep: Show up to three levels for a deadlock scenario Message-ID: <20171219164619.ehrsqvqajj4n6wr6@hirez.programming.kicks-ass.net> References: <20171214123852.515257aa@gandalf.local.home> <20171214175931.mlvr7lk7bcnsqu5i@hirez.programming.kicks-ass.net> <3317dd1a-1a39-3295-eb90-538be296dff8@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3317dd1a-1a39-3295-eb90-538be296dff8@oracle.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 28 On Tue, Dec 19, 2017 at 11:30:29AM -0500, Dhaval Giani wrote: > On 2017-12-14 12:59 PM, Peter Zijlstra wrote: > > On Thu, Dec 14, 2017 at 12:38:52PM -0500, Steven Rostedt wrote: > >> > >> Currently, when lockdep detects a possible deadlock scenario that involves 3 > >> or more levels, it just shows the chain, and a CPU sequence order of the > >> first and last part of the scenario, leaving out the middle level and this > >> can take a bit of effort to understand. By adding a third level, it becomes > >> easier to see where the deadlock is. > > > > So is anybody actually using this? This (together with the callchain for > > #0) is always the first thing of the lockdep output I throw away. > > > > Yes :-). The other stuff is unreadable to people not you. It really isn't that hard, Its mostly a question of TL;DR. #0 is useless and should be thrown out #1 shows where we take #1 while holding #0 .. #n shows where we take #n while holding #n-1 And the bottom callstack shows where we take #0 while holding #n. Which gets you a nice circle in your graph, which spells deadlock. Plenty people have shown they get this stuff.