From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH v2 05/28] dcache: remove dentries from LRU before putting on dispose list Date: Wed, 3 Apr 2013 12:55:01 +0400 Message-ID: <515BEE65.40503@parallels.com> References: <1364548450-28254-1-git-send-email-glommer@parallels.com> <1364548450-28254-6-git-send-email-glommer@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: "linux-mm@kvack.org" , Hugh Dickins , , Dave Chinner , Dave Shrinnker , Michal Hocko , Johannes Weiner , , Andrew Morton To: Sha Zhengju Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On 04/03/2013 10:51 AM, Sha Zhengju wrote: > +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 analysis seems to be correct, and the decrement in shrink_dcache_sb seems not to be needed. Dave, have comments on this ? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org