| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 4/5] xfs: introduce background inode reclaim work |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Fri, 4 Mar 2011 09:43:38 +1100 |
| Cc: | xfs@xxxxxxxxxxx, chris.mason@xxxxxxxxxx |
| In-reply-to: | <20110303153634.GB27205@xxxxxxxxxxxxx> |
| References: | <1298412969-14389-1-git-send-email-david@xxxxxxxxxxxxx> <1298412969-14389-5-git-send-email-david@xxxxxxxxxxxxx> <20110303153634.GB27205@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.20 (2009-06-14) |
On Thu, Mar 03, 2011 at 10:36:34AM -0500, Christoph Hellwig wrote:
> > +void
> > +xfs_syncd_queue_reclaim(
> > + struct xfs_mount *mp,
> > + int flags)
> > +{
> > + mutex_lock(&xfs_syncd_lock);
> > + if (!delayed_work_pending(&mp->m_reclaim_work))
> > + queue_delayed_work(xfs_syncd_wq, &mp->m_reclaim_work,
> > + xfs_syncd_centisecs / 5 * msecs_to_jiffies(10));
> > + mutex_unlock(&xfs_syncd_lock);
> > +
> > + if (flags & SYNC_WAIT)
> > + flush_delayed_work_sync(&mp->m_reclaim_work);
> > +}
>
> queue_work/queue_delayed_work have a test_set_bit on
> WORK_STRUCT_PENDING_BIT, so can just call queue_work/queue_delayed_work
> and it will do the right thing if it is in use. So you can remove the
> mutex and delayed_work_pending check here.
>
Yup, it's already gone. :)
> At least currently SYNC_WAIT is never set by any caller, and I wonder if
> we should just leave the waiting to the caller if we ever grow one.
I can remove it - it is a left over from testing different methods
of throttling the shrinker.
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 3/5] xfs: convert ENOSPC inode flushing to use new syncd workqueue, Dave Chinner |
|---|---|
| Next by Date: | When XFS saves secondary Super block, Ajeet Yadav |
| Previous by Thread: | Re: [PATCH 4/5] xfs: introduce background inode reclaim work, Christoph Hellwig |
| Next by Thread: | Re: [PATCH 1/5] xfs: introduce inode cluster buffer trylocks for xfs_iflush, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |