From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: chris.mason@oracle.com, xfs@oss.sgi.com
Subject: Re: [PATCH 4/5] xfs: introduce background inode reclaim work
Date: Fri, 4 Mar 2011 09:43:38 +1100 [thread overview]
Message-ID: <20110303224338.GQ15097@dastard> (raw)
In-Reply-To: <20110303153634.GB27205@infradead.org>
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@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-03-03 22:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 22:16 [RFC, PATCH 0/5] xfs: Reduce OOM kill problems under heavy load Dave Chinner
2011-02-22 22:16 ` [PATCH 1/5] xfs: introduce inode cluster buffer trylocks for xfs_iflush Dave Chinner
2011-03-03 15:55 ` Christoph Hellwig
2011-03-03 22:04 ` Dave Chinner
2011-02-22 22:16 ` [PATCH 2/5] xfs: introduce a xfssyncd workqueue Dave Chinner
2011-02-22 22:16 ` [PATCH 3/5] xfs: convert ENOSPC inode flushing to use new syncd workqueue Dave Chinner
2011-03-03 15:34 ` Christoph Hellwig
2011-03-03 22:41 ` Dave Chinner
2011-03-04 12:40 ` Christoph Hellwig
2011-02-22 22:16 ` [PATCH 4/5] xfs: introduce background inode reclaim work Dave Chinner
2011-03-03 15:36 ` Christoph Hellwig
2011-03-03 22:43 ` Dave Chinner [this message]
2011-02-22 22:16 ` [PATCH 5/5] xfs: kick inode writeback when low on memory Dave Chinner
2011-03-02 3:06 ` Dave Chinner
2011-03-02 14:12 ` Christoph Hellwig
2011-03-03 2:42 ` Dave Chinner
2011-03-03 15:48 ` Christoph Hellwig
2011-03-03 16:19 ` Christoph Hellwig
2011-03-09 5:46 ` Dave Chinner
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=20110303224338.GQ15097@dastard \
--to=david@fromorbit.com \
--cc=chris.mason@oracle.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