LWN.net Logo

Re: [PATCH v3 1/7] liblockdep: wrap kernel/lockdep.c to allow usage from userspace

From:  Ingo Molnar <mingo-AT-kernel.org>
To:  Sasha Levin <sasha.levin-AT-oracle.com>, Arnaldo Carvalho de Melo <acme-AT-infradead.org>
Subject:  Re: [PATCH v3 1/7] liblockdep: wrap kernel/lockdep.c to allow usage from userspace
Date:  Mon, 4 Feb 2013 11:48:46 +0100
Message-ID:  <20130204104845.GB24173@gmail.com>
Cc:  mingo-AT-redhat.com, peterz-AT-infradead.org, paulus-AT-samba.org, acme-AT-ghostprotocols.net, penberg-AT-kernel.org, linux-kernel-AT-vger.kernel.org
Archive-link:  Article, Thread


Ok, these liblockdep bits look really good and clean, and the 
perf integration is obviously useful. It does not conflict with 
any pending tools/perf work either.

Arnaldo, are you fine with:

  b2e7c77a3790 perf: Integrate liblockdep support into perf

?

We could keep it separate in tip:core/locking, no merge into 
tip:perf/core appears to be necessary for the time being.

A couple of suggestions:

1) One thing that is I think is missing is a fun to read 
tools/lib/lockdep/README that explains how to use it all for 
pthread_mutex_t and pthread_rwlock_t checking, and what the 
limitations are (if any).

2) Explicitly mentioning that the code and library is licensed 
under the kernel's GPL would be nice as well, for additional 
clarity - should anyone decide to package it up in distros.

3) Advanced: providing a shell environment variable (LOCKDEP=1?) 
as a way to enable it might be useful as well: that way tools 
could be built with lockdep built in but turned off by default - 
which can be turned on again on demand. It would only constitute 
some data structure overhead, a runtime check in the locking 
wrappers and a bit of an initialization overhead.

Thanks,

	Ingo


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds