linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hpe.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	<linux-ext4@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
	Scott J Norton <scott.norton@hpe.com>,
	Douglas Hatch <doug.hatch@hpe.com>,
	Toshimitsu Kani <toshi.kani@hpe.com>
Subject: Re: [PATCH v3 1/2] ext4: Pass in DIO_SKIP_DIO_COUNT flag if inode_dio_begin() called
Date: Tue, 26 Apr 2016 12:32:17 -0400	[thread overview]
Message-ID: <571F9811.20305@hpe.com> (raw)
In-Reply-To: <20160425114802.GA15856@infradead.org>

On 04/25/2016 07:48 AM, Christoph Hellwig wrote:
> On Thu, Apr 21, 2016 at 02:15:24PM -0400, Waiman Long wrote:
>> On 04/20/2016 04:58 PM, Christoph Hellwig wrote:
>>> FYI, none of the Dax code even needs to ever touch the dio_count,
>>> as dax I/O can't be asynchronous, and we thus don't need it to protect
>>> against truncate.  I'd suggest to remove it and then end_io callback
>> >from the DAX code entirely as a start and then move from there.
>>
>> Yes, it seems like we may not need to change the dio_count in dax_do_io()
>> after all. BTW, what do mean by using end_io callback as a start?
> I mean to remove both the i_dio_count manipulation, and the unessecary
> end_io callback from dax_do_io.

Thanks for the clarification.

Since DAX I/O is always synchronous, the locking done by the caller or 
in the dax_do_Io() for read should be enough to prevent truncation from 
happening at the same time. So we don't need to use i_dio_count for that 
purpose.

However, I have not understood enough of the block IO layer to determine 
if the end_io callback is really redundant. I am not confident enough to 
touch the end_io callback.

Cheers,
Longman

  reply	other threads:[~2016-04-26 16:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 18:12 [PATCH v3 0/2] ext4: Improve parallel I/O performance on NVDIMM Waiman Long
2016-04-12 18:12 ` [PATCH v3 1/2] ext4: Pass in DIO_SKIP_DIO_COUNT flag if inode_dio_begin() called Waiman Long
2016-04-14  3:16   ` Dave Chinner
2016-04-14 16:21     ` Waiman Long
2016-04-15  8:17       ` Dave Chinner
2016-04-15 17:17         ` Waiman Long
2016-04-15 22:19           ` Dave Chinner
2016-04-18 19:46             ` Waiman Long
2016-04-19 23:01               ` Dave Chinner
2016-04-20 15:59                 ` Waiman Long
2016-04-20 20:58   ` Christoph Hellwig
2016-04-21 18:15     ` Waiman Long
2016-04-25 11:48       ` Christoph Hellwig
2016-04-26 16:32         ` Waiman Long [this message]
2016-04-12 18:12 ` [PATCH v3 2/2] ext4: Make cache hits/misses per-cpu counts Waiman Long

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=571F9811.20305@hpe.com \
    --to=waiman.long@hpe.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=cl@linux.com \
    --cc=doug.hatch@hpe.com \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scott.norton@hpe.com \
    --cc=tj@kernel.org \
    --cc=toshi.kani@hpe.com \
    --cc=tytso@mit.edu \
    /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).