From: Josef Bacik Subject: Re: [RFC] possible badness in prune_dcache() Date: Fri, 4 Apr 2008 14:49:43 -0400 Message-ID: <20080404184943.GH22429@unused.rdu.redhat.com> References: <1207309200.12346.25.camel@bear.shadowland> <1207322926.12346.30.camel@bear.shadowland> <20080404152928.GD22429@unused.rdu.redhat.com> <20080404155729.GE22429@unused.rdu.redhat.com> <20080404184408.GG22429@unused.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Miklos Szeredi , Alexey.Lyashkov@Sun.COM, linux-fsdevel@vger.kernel.org, Andrew.Perepechko@Sun.COM, dhowells@redhat.com To: Josef Bacik Return-path: Received: from mx1.redhat.com ([66.187.233.31]:57417 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757006AbYDDS4O (ORCPT ); Fri, 4 Apr 2008 14:56:14 -0400 Content-Disposition: inline In-Reply-To: <20080404184408.GG22429@unused.rdu.redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Apr 04, 2008 at 02:44:08PM -0400, Josef Bacik wrote: > On Fri, Apr 04, 2008 at 08:38:31PM +0200, Miklos Szeredi wrote: > > > > probably worth looking at doing something different in the case of > > > > shrinking the dcache on the parent, and leaving prune_dcache to > > > > only be called in the case of trying to free up dcache under > > > > memory pressure, where the superblock doesn't actually matter. > > > > For the RHEL3 issue you are reffering to I fixed it by creating a > > > > private list when we shrunk the parent, and submitting that list > > > > to prune_dcache that way we didn't spend all this time looping. I > > > > will see what can be done for upstream. > > > > Which sounds racy with umount. A hashed dentry must either have a > > refcount greater than one, or be on dentry_unused list. This patch > > breaks that assumption. > > > > It should be racy with umount, if we notice that we're being unmounted we just > break, as the unmount will free the dentry's itself through another means. I > guess I could fix it so that prune_dcache will go through and add all the > dentry's still on the dispose_list to the dentry_unused list at the end, but I > don't see much of a reason for this since dentry_unused is just used to help > keep track of what dentries can be flushed. > Hmm, thats shouldn't, not should. Josef