Re: [PATCH v2 05/28] dcache: remove dentries from LRU before putting on dispose list

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

 



On Wed, Apr 03, 2013 at 02:51:43PM +0800, Sha Zhengju wrote:
> On Fri, Mar 29, 2013 at 5:13 PM, Glauber Costa <glommer@xxxxxxxxxxxxx>wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > @@ -884,6 +907,28 @@ relock:
> >         shrink_dentry_list(&tmp);
> >  }
> >
> > +/*
> > + * Mark all the dentries as on being the dispose list so we don't think
> > they are
> > + * still on the LRU if we try to kill them from ascending the parent
> > chain in
> > + * try_prune_one_dentry() rather than directly from the dispose list.
> > + */
> > +static void
> > +shrink_dcache_list(
> > +       struct list_head *dispose)
> > +{
> > +       struct dentry *dentry;
> > +
> > +       rcu_read_lock();
> > +       list_for_each_entry_rcu(dentry, dispose, d_lru) {
> > +               spin_lock(&dentry->d_lock);
> > +               dentry->d_flags |= DCACHE_SHRINK_LIST;
> > +               this_cpu_dec(nr_dentry_unused);
> >
> 
> Why here dec nr_dentry_unused again? Has it been decreased in the following
> shrink_dcache_sb()?

You are right, that's a bugi as we've already accounted for the
dentry being pulled off the LRU list. Good catch.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers




[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux