RE: [RFC] possible badness in prune_dcache()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 04, 2008 at 09:01:26PM +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.
> 
> But unmount could have already finished by then.  And now you are
> dereferencing a super block, that no longer exists.  Not good.
> 
> This separate list thing can't work, unfortunately.  On the other hand
> we should probably split prune_dcache() into two separate functions:
> the garbage collector one (with sb == NULL argument) and the sb
> specific shrinker.  It should I think be possible to share the second
> one with shrink_dcache_sb().
>

Hi.

As another reply, there is a patch David Chinner you list below.

Per-superblock unused dentry LRU
http://lwn.net/Articles/185465/

There is an article below as the recent argument which it is related.
http://lkml.org/lkml/2008/3/5/590

I think that the idea of per superblock unusued LRUs is rational.

Thanks



--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux