public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 1/7] xfs: use a normal shrinker for the dquot freelist
Date: Fri, 10 Feb 2012 10:48:17 -0600	[thread overview]
Message-ID: <20120210164817.GN7762@sgi.com> (raw)
In-Reply-To: <20120210015233.GF12836@dastard>

On Fri, Feb 10, 2012 at 12:52:33PM +1100, Dave Chinner wrote:
> 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:
> > > On Thu, Feb 09, 2012 at 04:03:20PM -0600, Ben Myers wrote:
> > > > > -
> > > > > -	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....

Aha.  Thanks for the explanation.  It sounds like including
sysclt_vfs_cache_pressure in this calculation is a good thing.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-02-10 16:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01 13:57 [PATCH 0/7] better dquot caching Christoph Hellwig
2012-02-01 13:57 ` [PATCH 1/7] xfs: use a normal shrinker for the dquot freelist Christoph Hellwig
2012-02-09 22:03   ` Ben Myers
2012-02-09 22:56     ` Christoph Hellwig
2012-02-09 23:13       ` Ben Myers
2012-02-10  1:52         ` Dave Chinner
2012-02-10 16:48           ` Ben Myers [this message]
2012-02-10  1:49       ` Dave Chinner
2012-02-10 16:56         ` Ben Myers
2012-02-01 13:57 ` [PATCH 2/7] xfs: per-filesystem dquot LRU lists Christoph Hellwig
2012-02-01 13:57 ` [PATCH 3/7] xfs: use per-filesystem radix trees for dquot lookup Christoph Hellwig
2012-02-01 13:57 ` [PATCH 4/7] xfs: remove the per-filesystem list of dquots Christoph Hellwig
2012-02-01 13:57 ` [PATCH 5/7] xfs: use per-cpu data for the quota statistics Christoph Hellwig
2012-02-01 13:57 ` [PATCH 6/7] xfs: user per-cpu stats for the total dquot numbers Christoph Hellwig
2012-02-01 13:57 ` [PATCH 7/7] xfs: remove the globalk xfs_Gqm structure Christoph Hellwig
2012-02-07  7:30 ` [PATCH 0/7] better dquot caching Ben Myers
2012-02-07 13:24   ` Christoph Hellwig
2012-02-07 15:23     ` Ben Myers
2012-02-11 20:13 ` Arkadiusz Miśkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120210164817.GN7762@sgi.com \
    --to=bpm@sgi.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox