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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux