From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount Date: Sun, 8 Sep 2013 20:32:03 -0700 Message-ID: References: <1375758759-29629-1-git-send-email-Waiman.Long@hp.com> <1375758759-29629-2-git-send-email-Waiman.Long@hp.com> <1377751465.4028.20.camel@pasglop> <20130829070012.GC27322@gmail.com> <20130909000300.GH13318@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Ingo Molnar , Benjamin Herrenschmidt , Waiman Long , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner , linux-fsdevel , Linux Kernel Mailing List , Peter Zijlstra , Steven Rostedt , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" To: Al Viro Return-path: In-Reply-To: <20130909000300.GH13318@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sun, Sep 8, 2013 at 5:03 PM, Al Viro wrote: > > There's one exception - basically, we decide to put duplicates of > reference(s) we hold into (a bunch of) structures being created. If > we decide that we'd failed and need to roll back, the structures > need to be taken out of whatever lists, etc. they'd been already > put on and references held in them - dropped. That removal gets done > under a spinlock. Sure, we can string those structures on some kind > of temp list, drop the spinlock and do dput() on everything in there, > but it's much more convenient to just free them as we are evicting > them, doing dput() as we go. Which is safe, since we are still have > the references used to create these buggers pinned down. Hmm. Which codepath does this? Because I got curious and added back the __might_sleep() unconditionally to dput() just to see (now that I think that the dput() bugs are gone), and at least under normal load it doesn't trigger. I even wrote a thing that just constantly creates and renames the target file concurrently with looking it up, so that I've stress-tested the RCU sequence number failure path (and verified with a profile that yes, it does trigger the "oops, need to retry" case). I didn't test anything odd at all (just my dentry stress tests and a regular graphical desktop), though. And I have too much memory to sanely stress any out-of-memory situations. #firstworldkerneldeveloperproblems Linus