From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965716AbWKHNIr (ORCPT ); Wed, 8 Nov 2006 08:08:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965718AbWKHNIr (ORCPT ); Wed, 8 Nov 2006 08:08:47 -0500 Received: from gprs189-60.eurotel.cz ([160.218.189.60]:59804 "EHLO amd.ucw.cz") by vger.kernel.org with ESMTP id S965716AbWKHNIq (ORCPT ); Wed, 8 Nov 2006 08:08:46 -0500 Date: Wed, 8 Nov 2006 14:08:33 +0100 From: Pavel Machek To: Jason Baron Cc: Ingo Molnar , linux-kernel@vger.kernel.org, arjan@infradead.org, rdreier@cisco.com Subject: Re: locking hierarchy based on lockdep Message-ID: <20061108130833.GA9599@elf.ucw.cz> References: <20061106200529.GA15370@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Warning: Reading this can be dangerous to your mental health. User-Agent: Mutt/1.5.11+cvs20060126 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi! > > * Jason Baron wrote: > > > > > I've implemented this as a /proc file, but Ingo suggested that it > > > might be better for us to simply produce an adjaceny list, and then > > > generate a locking hierarchy or anything else of interest off of that > > > list.... [...] > > > > this would certainly be the simplest thing to do - we could extend > > /proc/lockdep with the list of 'immediately after' locks separated by > > commas. (that list already exists: it's the lock_class.locks_after list) > > > > i like your idea of using lockdep to document locking hierarchies. > > > > Ingo > > > > hi, > > So below is patch that does what you suggest, although i had to add the > concept of 'distance' to the patch since the locks_after list loses this > dependency info afaict. i also wrote a user space program to sort the > locks into cluster of interelated locks and then sorted within these > clusters...the results show one large clump of locks...perhaps there are a > few locks that time them all together like scheduler locks...but i > couldn't figure out which ones to exclude to make the list look really > pretty (also, there could be a bug in my program :). Anyways i'm including > my test program and its output too... Perhaps presenting it as a tree is worth it? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html