From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Wu Fengguang <fengguang.wu@intel.com>,
xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: improve sync behaviour in face of aggressive dirtying
Date: Wed, 22 Jun 2011 02:51:13 -0400 [thread overview]
Message-ID: <20110622065113.GA30411@infradead.org> (raw)
In-Reply-To: <20110622010911.GS32466@dastard>
On Wed, Jun 22, 2011 at 11:09:11AM +1000, Dave Chinner wrote:
> All good, except I think there's a small problem with this - we have
> to process the ioends before pages will transition from WRITEBACK to
> clean. i.e. it is not until xfs_ioend_destroy() that we call the
> bh->b_end_io() function to update the page state. Hence it would
> have to be:
>
> xfs_fsync() {
>
> current->journal_info = &ioend_end_list;
>
> filemap_fdatawrite();
>
> list_for_each_entry_reverse(ioend_end_list) {
> /* process_ioend also waits for ioend completion */
> process_ioend();
> }
>
> current->journal_info = NULL;
>
> filemap_fdatawait();
Indeed.
> Direct IO is another matter, but we've already got an
> xfs_ioend_wait() in xfs_fsync() to deal with that. Perhaps that
> could be moved over to your new DIO counter so we do block on all
> pending IO?
Splitting the pending direct I/O requests into the one is indeed the
plan. We'll still need to track ioends for them, though - and I haven't
though about thedetails for those yet.
> > If that sounds reasonable I'll respin a series to move to
> > per-mount workqueues, remove the EAGAIN case, and use the workqueue
> > flush in sync. Fsync will be left for later, and I'll ping Josef to
> > resend his fsync prototype change.
>
> Yes, sounds like a plan.
I've implemented it yesterday, and it appears to work fine. But there's
another issues I found: the flush_workqueue will update i_size and mark
the inodes dirty right now from ->sync_fs, but that's after we've done
the VFS writeback. I guess I nees to order this patch after the one
I'm working on to stop doing non-transaction inode updates.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2011-06-22 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 13:14 [PATCH] xfs: improve sync behaviour in face of aggressive dirtying Christoph Hellwig
2011-06-20 8:18 ` Christoph Hellwig
2011-06-21 0:33 ` Dave Chinner
2011-06-21 7:21 ` Michael Monnerie
2011-06-22 0:19 ` Dave Chinner
2011-06-21 9:29 ` Christoph Hellwig
2011-06-22 1:09 ` Dave Chinner
2011-06-22 6:51 ` Christoph Hellwig [this message]
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=20110622065113.GA30411@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--cc=fengguang.wu@intel.com \
--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