From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>,
linux-fsdevel@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH 1/2] [PATCH 1/2] direct-io: implement generic deferred AIO completions
Date: Thu, 20 Dec 2012 12:15:16 +0100 [thread overview]
Message-ID: <20121220111516.GA3301@quack.suse.cz> (raw)
In-Reply-To: <20121208120203.GB8442@infradead.org>
On Sat 08-12-12 07:02:03, Christoph Hellwig wrote:
> On Thu, Dec 06, 2012 at 08:05:37PM +0100, Jan Kara wrote:
> > I like this, but this patch already breaks ext4, doesn't it?
>
> > ^^^ Here ext4 offloads IO completion to a worker thread. So you now
> > complete AIO / DIO before ext4_end_io() runs which is a bug (ext4_end_io()
> > is responsible for example for calling end_page_writeback()). I'll modify
> > these patches to work for ext4 tomorrow I hope...
>
> You're right, patch 2 actively deadlocks ext4 under xfstests, but the
> first one already breaks semantics. So any rework of the ext4 unwritten
> extent handling really should go before these two patches.
Just to let you know, I didn't forget about this. I even have patches
to change PageWriteback handling in ext4 but I realized it can cause
deadlocks.
When converting unwritten extents to written ones, we need to start a
transaction, that may block because of lack of journal space waiting for
currently running transaction to finish. And that running transaction never
finishes because someone (e.g. ext4_write_begin()) has a handle to it waiting
for PageWriteback bit (e.g. in grab_cache_page_write_begin()).
I'm pondering how we could fix this in ext4 because I'd really like to get
rid of that PageWriteback handling oddity in ext4. Just it's not simple...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2012-12-20 11:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 7:55 [PATCH 0/2] handle O_(D)SYNC for AIO Christoph Hellwig
2012-11-23 7:55 ` [PATCH 1/2] [PATCH 1/2] direct-io: implement generic deferred AIO completions Christoph Hellwig
2012-11-27 16:17 ` Jeff Moyer
2012-12-06 19:05 ` Jan Kara
2012-12-08 12:02 ` Christoph Hellwig
2012-12-20 11:15 ` Jan Kara [this message]
2012-11-23 7:55 ` [PATCH 2/2] [PATCH 2/2] direct-io: handle handle O_(D)SYNC AIO Christoph Hellwig
2012-11-27 16:19 ` Jeff Moyer
2012-11-28 0:26 ` Darrick J. Wong
2012-11-28 0:30 ` Christoph Hellwig
2012-11-28 8:02 ` [RFC PATCH] ext4: Convert unwritten extents during end_io processing Darrick J. Wong
2012-11-28 14:34 ` Christoph Hellwig
2012-11-29 19:47 ` Darrick J. Wong
2012-12-05 13:08 ` [PATCH 2/2] [PATCH 2/2] direct-io: handle handle O_(D)SYNC AIO Jan Kara
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=20121220111516.GA3301@quack.suse.cz \
--to=jack@suse.cz \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=jmoyer@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.