From: Christoph Hellwig <hch@infradead.org>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
fengguang.wu@intel.com
Subject: Re: [PATCH] writeback: Don't wait for completion in writeback_inodes_sb_nr
Date: Wed, 29 Jun 2011 14:00:10 -0400 [thread overview]
Message-ID: <20110629180010.GB32236@infradead.org> (raw)
In-Reply-To: <BANLkTinoFOnQoo3k3KiDgqd7+uBH6shNesxhmVRo9wWr0WCkEw@mail.gmail.com>
On Wed, Jun 29, 2011 at 10:26:33AM -0700, Curt Wohlgemuth wrote:
> The semantics did change between 2.6.34 and 2.6.35 though. When the
> work item queue was introduced in 2.6.32, the semantics changed from
> what you describe above to what's present through 2.6.34:
> writeback_inodes_sb() would enqueue a work item, and return. Your
> commit 83ba7b07 ("writeback: simplify the write back thread queue")
> added the wait_for_completion() call, putting the semantics back to
> where they were pre-2.6.32.
Yes. The kernels inbetween had that nasty writeback vs umount races
that we could trigger quite often.
> Though one additional change between the old way (pre-2.6.32) and
> today: with the old kernel, the pdflush thread would operate
> concurrently with the first (and second?) sync path through writeback.
> Today of course, they're *all* serialized. So really a call to
> sys_sync() will enqueue 3 work items -- one from
> wakeup_flusher_threads(), one from writeback_inodes_sb(), and one from
> sync_inodes_sb().
Yes. And having WB_SYNC_NONE items from both wakeup_flusher_threads vs
writeback_inodes_sb is plain stupid. The initial conversion to the
new sync_filesystem scheme had removed the wakeup_flusher_threads
call, but that caused a huge regression in some benchmark.
As mentioned before Wu was working on some code to introduce tagging
so that the WB_SYNC_ALL call won't start writing pages dirtied after
the sync call, which should help with your issue. Although to
completely solve it we really need to get down to just two passes.
next prev parent reply other threads:[~2011-06-29 18:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 23:43 [PATCH] writeback: Don't wait for completion in writeback_inodes_sb_nr Curt Wohlgemuth
2011-06-29 0:54 ` Dave Chinner
2011-06-29 1:56 ` Curt Wohlgemuth
2011-06-29 8:11 ` Christoph Hellwig
2011-06-29 16:57 ` Jan Kara
2011-06-29 17:55 ` Christoph Hellwig
2011-06-29 19:15 ` Jan Kara
2011-06-29 20:12 ` Christoph Hellwig
2011-06-30 12:15 ` Jan Kara
2011-06-30 12:37 ` Christoph Hellwig
2011-07-01 22:55 ` Curt Wohlgemuth
2011-07-02 11:32 ` Christoph Hellwig
2011-07-11 17:00 ` Jan Kara
2011-07-11 17:11 ` Curt Wohlgemuth
2011-07-11 19:48 ` Jan Kara
2011-07-11 19:51 ` Curt Wohlgemuth
2011-07-11 20:11 ` Christoph Hellwig
2011-07-12 10:34 ` Jan Kara
2011-07-12 10:41 ` Christoph Hellwig
2011-07-12 22:37 ` Jan Kara
2011-07-14 16:29 ` Curt Wohlgemuth
2011-07-14 23:08 ` Jan Kara
2011-07-19 16:56 ` Christoph Hellwig
2011-07-21 18:35 ` Jan Kara
2011-07-22 15:16 ` Christoph Hellwig
2011-07-19 16:53 ` Christoph Hellwig
2011-07-19 16:51 ` Christoph Hellwig
2011-07-20 22:00 ` Jan Kara
2011-07-22 15:11 ` Christoph Hellwig
2011-06-29 17:26 ` Curt Wohlgemuth
2011-06-29 18:00 ` Christoph Hellwig [this message]
2011-06-29 21:30 ` Curt Wohlgemuth
2011-07-19 15:54 ` Christoph Hellwig
2011-06-29 6:42 ` Christoph Hellwig
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=20110629180010.GB32236@infradead.org \
--to=hch@infradead.org \
--cc=curtw@google.com \
--cc=fengguang.wu@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).