From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [RFC 2/3] lockdep: be nice about compiling from userspace Date: Thu, 25 Oct 2012 15:17:15 -0400 Message-ID: <5089903B.2060508@oracle.com> References: <1351098010-20849-1-git-send-email-sasha.levin@oracle.com> <1351098010-20849-2-git-send-email-sasha.levin@oracle.com> <20121025080502.GF3712@gmail.com> <50896FC2.1070001@oracle.com> <20121025170616.GA1267@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: penberg@kernel.org, mingo@redhat.com, peterz@infradead.org, asias.hejun@gmail.com, tglx@linutronix.de, gorcunov@openvz.org, kvm@vger.kernel.org To: Ingo Molnar Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:29764 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760100Ab2JYTT2 (ORCPT ); Thu, 25 Oct 2012 15:19:28 -0400 In-Reply-To: <20121025170616.GA1267@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/25/2012 01:06 PM, Ingo Molnar wrote: > * Sasha Levin wrote: >> Yes, we can wrap both static_obj() and debug_show_all_locks() >> with #ifndefs and let kvmtool provide it's own version of >> those two. > > Only static_obj() - I see no immediate reason why you shouldn't > be able to utilize debug_show_all_locks(). 'vm debug -a' already > lists all backtraces on all vcpus - so 'vm debug lockdep -a' > could list all current locks and indicate which one is held and > by whom. I'm not sure how we'd make debug_show_all_locks() work in userspace since it would require us to wrap do_each_thread() & friends to iterate over all our task_structs. I was thinking about writing a corresponding debug_show_all_locks() that would simply iterate a list of our dummy task_structs. Thanks, Sasha