From: Steven Whitehouse Date: Thu, 12 Nov 2009 17:27:21 +0000 Subject: [Cluster-devel] Re: [PATCH 2/2] dlm: Add down/up_write_non_owner to keep lockdep happy In-Reply-To: <1258044339.4039.685.camel@laptop> References: <1255445776-3112-1-git-send-email-swhiteho@redhat.com> <1255445776-3112-2-git-send-email-swhiteho@redhat.com> <1255445776-3112-3-git-send-email-swhiteho@redhat.com> <20091112142211.GA468@elte.hu> <1258036158.6052.874.camel@localhost.localdomain> <20091112171457.GD20714@redhat.com> <1258044339.4039.685.camel@laptop> Message-ID: <1258046841.6052.889.camel@localhost.localdomain> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On Thu, 2009-11-12 at 17:45 +0100, Peter Zijlstra wrote: > On Thu, 2009-11-12 at 11:14 -0600, David Teigland wrote: > > up_write_non_owner() > > addresses this trace, which as you say, is from doing the down and up from > > different threads (which is the intention): > > That's really something I cannot advice to do. Aside from loosing > lock-dependency validation (not a good thing), asymmetric locking like > that is generally very hard to analyze since its not clear who 'owns' > what data when. > > There are a few places in the kernel that use the non_owner things, and > we should generally strive to remove them, not add more. > > Please consider solving your problem without adding things like this. > The code that does this already exists - it is not being added by the patch. Its just that in recent kernels lockdep has started noticing the problem. I did seriously consider changing the locking rather than just silencing the messages, but it looks rather complicated and not easily replaced with other primitives. Any suggestions as to a better solution are welcome, Steve.