On Tue, Feb 14, 2012 at 09:29:27PM -0500, Christoph Hellwig wrote:
> Replace the global dquot lru lists with a per-filesystem one.
>
> Note that the shrinker isn't wired up to the per-superblock VFS shrinker
> infrastructure, as doing so would cause problems due to summing up and
> splitting out again the counts for inodes and dquots. I do not believe this
> is a major issue as the quota cache is not deeply interwinded with inode
> and dentry caching.
Yes, that's fine, like the xfs_buf cache has it's own shrinker
and reclaim algorithm....
> Also temporarily stop tracking the system-wide count of dquots on the LRU
> lists for /proc/fs/xfs/xqm, which will be added back later in the series.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
....
> @@ -869,12 +868,13 @@ recurse:
>
> trace_xfs_dqput_free(dqp);
>
> - mutex_lock(&xfs_Gqm->qm_dqfrlist_lock);
> - if (list_empty(&dqp->q_freelist)) {
> - list_add_tail(&dqp->q_freelist, &xfs_Gqm->qm_dqfrlist);
> - xfs_Gqm->qm_dqfrlist_cnt++;
> + mutex_lock(&dqp->q_mount->m_quotainfo->qi_lru_lock);
> + if (list_empty(&dqp->q_lru)) {
> + list_add_tail(&dqp->q_lru,
> + &dqp->q_mount->m_quotainfo->qi_lru_list);
> + dqp->q_mount->m_quotainfo->qi_lru_count++;
> }
> - mutex_unlock(&xfs_Gqm->qm_dqfrlist_lock);
> + mutex_unlock(&dqp->q_mount->m_quotainfo->qi_lru_lock);
Might be nice to add a
+ struct xfs_quotainfo *qi = dqp->q_mount->m_quotainfo;
here to make the code a little easier to read and consistent with
all the other functions.
Regardless, change looks good.
Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
--
Dave Chinner
david@xxxxxxxxxxxxx
|