Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750965AbdLSR3r (ORCPT ); Tue, 19 Dec 2017 12:29:47 -0500 Received: from merlin.infradead.org ([205.233.59.134]:59518 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750723AbdLSR3p (ORCPT ); Tue, 19 Dec 2017 12:29:45 -0500 Date: Tue, 19 Dec 2017 18:29:37 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Dhaval Giani , LKML , Ingo Molnar , Thomas Gleixner , Andrew Morton Subject: Re: [PATCH] lockdep: Show up to three levels for a deadlock scenario Message-ID: <20171219172937.uiwnnkde5iuw3mva@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> <20171219164619.ehrsqvqajj4n6wr6@hirez.programming.kicks-ass.net> <20171219115238.03dc992c@gandalf.local.home> <20171219170716.2b2t5u6msalhqus3@hirez.programming.kicks-ass.net> <20171219121124.79bca79b@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171219121124.79bca79b@gandalf.local.home> 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: 1366 Lines: 40 On Tue, Dec 19, 2017 at 12:11:24PM -0500, Steven Rostedt wrote: > On Tue, 19 Dec 2017 18:07:16 +0100 > Peter Zijlstra wrote: > > > On Tue, Dec 19, 2017 at 11:52:38AM -0500, Steven Rostedt wrote: > > > Then I suggest that you can either take my patch to improve the > > > visual or remove the visual completely, as nobody cares about it. > > > > Doesn't apply as is; but can you at least make it shut up if the chain > > is longer than you support? > > I can add that. > > > > > It's really annoying if it shows the AB-BA graphics when you're staring > > at a 5-6 lock scenario. > > I could also make it dynamic, to handle the entire chain. But it will > make it longer. Makes it too wide I think, people already have a problem quoting the thing in emails (wrap mangles like stupid). Take the below while you're poking at it.. that should hopefully make the #0 stacktrace go away. diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 5fa1324a4f29..6aa431c4ad99 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -1085,7 +1085,8 @@ print_circular_bug_entry(struct lock_list *target, int depth) printk("\n-> #%u", depth); print_lock_name(target->class); printk(KERN_CONT ":\n"); - print_stack_trace(&target->trace, 6); + if (depth) + print_stack_trace(&target->trace, 6); return 0; }