From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [patch 11/33] fs: dcache scale subdirs Date: Wed, 23 Jun 2010 09:23:15 +0200 Message-ID: <1277277795.1875.748.camel@laptop> References: <20090904065142.114706411@nick.local0.net> <20090904065535.609317663@nick.local0.net> <1276787615.27822.426.camel@twins> <20100617165329.GA6138@laptop> <1277127322.1875.516.camel@laptop> <20100621144806.GC31679@laptop> <1277132103.1875.519.camel@laptop> <1277186557.1791.7.camel@work-vm> <1277191631.1875.525.camel@laptop> <1277258596.1685.16.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: Nick Piggin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, John Kacur , Thomas Gleixner To: john stultz Return-path: In-Reply-To: <1277258596.1685.16.camel@localhost> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2010-06-22 at 19:03 -0700, john stultz wrote: > > Well, you make lockdep very unhappy by locking multiple dentries > > (unbounded number) all in the same lock class. > > So.. Is there a way to tell lockdep that the nesting is ok (I thought > that was what the spin_lock_nested call was doing...)? spin_lock_nested() allows you to nest a limited number of locks (up to 8, although the usual case is 1). > Or is locking a (possibly quite long) chain of objects really just a > do-not-do type of operation? Usually, yeah. It would be really nice to do this another way (also for scalability, keeping a large subtree locked is bound to to lead to more contention).