From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: Waiman Long <Waiman.Long@hpe.com>,
"Theodore Ts'o" <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Matthew Wilcox <willy@linux.intel.com>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Dave Chinner <david@fromorbit.com>,
Christoph Hellwig <hch@infradead.org>,
Scott J Norton <scott.norton@hpe.com>,
Douglas Hatch <doug.hatch@hpe.com>,
Toshimitsu Kani <toshi.kani@hpe.com>
Subject: Re: [PATCH v5 1/2] dax: Don't touch i_dio_count in dax_do_io()
Date: Thu, 5 May 2016 07:27:48 -0700 [thread overview]
Message-ID: <20160505142748.GA10157@infradead.org> (raw)
In-Reply-To: <20160505141637.GJ1970@quack2.suse.cz>
On Thu, May 05, 2016 at 04:16:37PM +0200, Jan Kara wrote:
> We cannot easily do this currently - the reason is that in several places we
> wait for i_dio_count to drop to 0 (look for inode_dio_wait()) while
> holding i_mutex to wait for all outstanding DIO / DAX IO. You'd break this
> logic with this patch.
>
> If we indeed put all writes under i_mutex, this problem would go away but
> as Dave explains in his email, we consciously do as much IO as we can
> without i_mutex to allow reasonable scalability of multiple writers into
> the same file.
So the above should be fine for xfs, but you're telling me that ext4
is doing DAX I/O without any inode lock at all? In that case it's
indeed not going to work.
> The downside of that is that overwrites and writes vs reads are not atomic
> wrt each other as POSIX requires. It has been that way for direct IO in XFS
> case for a long time, with DAX this non-conforming behavior is proliferating
> more. I agree that's not ideal but serializing all writes on a file is
> rather harsh for persistent memory as well...
For non-O_DIRECT I/O it's simply required..
next prev parent reply other threads:[~2016-05-05 14:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 16:27 [PATCH v5 0/2] ext4: Improve parallel I/O performance on NVDIMM Waiman Long
2016-04-29 16:27 ` [PATCH v5 1/2] dax: Don't touch i_dio_count in dax_do_io() Waiman Long
2016-05-05 14:16 ` Jan Kara
2016-05-05 14:27 ` Christoph Hellwig [this message]
2016-05-05 15:48 ` Jan Kara
2016-04-29 16:27 ` [PATCH v5 2/2] ext4: Make cache hits/misses per-cpu counts Waiman Long
2016-05-05 14:03 ` Jan Kara
2016-04-29 16:38 ` [PATCH v5 0/2] ext4: Improve parallel I/O performance on NVDIMM Waiman Long
2016-05-01 17:28 ` Christoph Hellwig
2016-05-02 17:45 ` Waiman Long
2016-05-05 1:57 ` Dave Chinner
2016-05-05 14:19 ` 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=20160505142748.GA10157@infradead.org \
--to=hch@infradead.org \
--cc=Waiman.Long@hpe.com \
--cc=adilger.kernel@dilger.ca \
--cc=david@fromorbit.com \
--cc=doug.hatch@hpe.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=scott.norton@hpe.com \
--cc=toshi.kani@hpe.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@linux.intel.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
Powered by JetHome