[Top] [All Lists]

Re: [PATCH 4/6] xfs: introduce background inode reclaim work

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 4/6] xfs: introduce background inode reclaim work
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 18 Mar 2011 15:00:06 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110310174054.GD19609@xxxxxxxxxxxxx>
References: <1299715529-11026-1-git-send-email-david@xxxxxxxxxxxxx> <1299715529-11026-5-git-send-email-david@xxxxxxxxxxxxx> <20110310174054.GD19609@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Thu, Mar 10, 2011 at 12:40:54PM -0500, Christoph Hellwig wrote:
> Why do we still keep the inode reclaim in the syncer work?  If we
> already have this one doing it I don't think we need it there as well.

Ok. Removed.

> >  /*
> > + * Queue a new inode reclaim pass if there isn't one already in progress.
> > + * Wait for completion of the flush if necessary.
> No, it doesn't wait ever.


> > + */
> > +static void
> > +xfs_syncd_queue_reclaim(
> > +   struct xfs_mount        *mp)
> > +{
> > +   queue_delayed_work(xfs_syncd_wq, &mp->m_reclaim_work,
> > +                   xfs_syncd_centisecs / 5 * msecs_to_jiffies(10));
> What explanation is there for the magic 5?  E.g. why do we neeed to run
> it exactly 5 times as often as the normal sync work?

It doesn't have to be exactly 5x more frequent, just that it needs
to run quite a bit more often than the normal sync work. tens times
more often seems like overkill and a lot of overhead given the scan
reclaim does, while two times more often isn't sufficient to avoid
significant build up of dirty reclaimable inodes that need to be
written before they can be reclaimed..

> Should it have it's
> own tunable?

Perhaps. I'm not convinced it is necessary, though.

> And isn't ever 6 seconds by default a little often on
> systems trying to saver power, especiall if there aren't any inodes to
> reclaim?  Should we trigger starting this work off having reclaimable
> inodes tagged in the radix tree?

Yes, probably should. I'll see if I can do that easily.

> > +   /* first unpin all the dirty and stale inodes. */
> > +   xfs_log_force(mp, XFS_LOG_SYNC);
> So we force out the log every 6 seconds.  That's a lot more often than
> most other filesystem and might have adverse performance impact.

I'll remove that and leave it for the sync inode reclaim to force
out the log...


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>