Thread (19 messages) 19 messages, 4 authors, 2012-02-11

Re: [PATCH 1/7] xfs: use a normal shrinker for the dquot freelist

From: Dave Chinner <david@fromorbit.com>
Date: 2012-02-10 01:52:36

On Thu, Feb 09, 2012 at 05:13:46PM -0600, Ben Myers wrote:
On Thu, Feb 09, 2012 at 05:56:26PM -0500, Christoph Hellwig wrote:
quoted
On Thu, Feb 09, 2012 at 04:03:20PM -0600, Ben Myers wrote:
quoted
quoted
-
-	return B_TRUE;
+	while (!list_empty(&dispose_list)) {
+		dqp = list_first_entry(&dispose_list, struct xfs_dquot,
+				       q_freelist);
+		list_del_init(&dqp->q_freelist);
+		xfs_qm_dqfree_one(dqp);
+	}
+out:
+	return (xfs_Gqm->qm_dqfrlist_cnt / 100) * sysctl_vfs_cache_pressure;
return atomic_read(&xfs_Gqm->qm_totaldquots);

This works well for me and seems to be closer to the shrinker interface
as documented:
It's pointless - we can only apply pressure to dquots that are on the
freelist.  No amount of shaking will allow us to reclaim a referenced
dquot.
Sure... then it should be:

return atomic_read(&xfs_Gqm->qm_frlist_cnt);

What is the value of the additional calculation?
It's applying the user controllable vfs_cache_pressure setting to
the reclaim weight. That is, if the user wants to reclaim
inode/dentry/dquot slab caches faster than the page cache (i.e.
perfer data caching over metadata caching) or vice cersa, then the
change the sysctl value and shrinkers should then take that into
account....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help