From: Dave Chinner <david@fromorbit.com>
To: Ming Lei <ming.lei@canonical.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Jens Axboe <axboe@kernel.dk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dave Kleikamp <dave.kleikamp@oracle.com>,
Zach Brown <zab@zabbo.net>,
Maxim Patlasov <mpatlasov@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH v9 6/6] block: loop: support DIO & AIO
Date: Mon, 10 Aug 2015 09:41:26 +1000 [thread overview]
Message-ID: <20150809234126.GA906@dastard> (raw)
In-Reply-To: <CACVXFVOdc5GYrgUXGarosc5AGNvJbsGG+i=R5o+NDKkQHGwFoQ@mail.gmail.com>
On Sun, Aug 09, 2015 at 10:27:14AM -0400, Ming Lei wrote:
> On Sun, Aug 9, 2015 at 9:44 AM, Christoph Hellwig <hch@infradead.org> wrote:
> > On Sun, Aug 09, 2015 at 09:04:32AM -0400, Ming Lei wrote:
> >> Now the logical block size of loop is 512byte, but the sector size of
> >> backing device may be 4K, so we can't do 512 byte algined direct
> >> I/O to the filesystem in this situation.
> >>
> >> With runtime switch to buffered I/O we can fix this problem, but
> >> most of times it won't fall in this case.
> >
> > The right way to handle this case is to not allow direct I/O at all,
> > you'll be constantly switching between direct and buffered I/O
> > otherwise, which is a bad idea.
>
> In theory we should not allow dio for this case, but in reality,
> as Dave Chinner mentioned, all buffered I/O and normal dio
> are page aligned, so we can make most of sane applications
> benefited from this patch, and for few insane applications,
> frequent swich between buffered I/O and direct I/O shouldn't
> be very bad too since draining dio is just like batched sync I/O.
If Christoph thinks we should not allow this case, then go with what
Christoph says.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2015-08-09 23:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 8:42 [PATCH v9 0/6] block: loop: improve loop with AIO Ming Lei
2015-08-06 8:42 ` [PATCH v9 1/6] fs: direct-io: don't dirtying pages for ITER_BVEC/ITER_KVEC direct read Ming Lei
2015-08-06 8:42 ` [PATCH v9 2/6] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop Ming Lei
2015-08-06 8:42 ` [PATCH v9 3/6] block: loop: use kthread_work Ming Lei
2015-08-06 8:42 ` [PATCH v9 4/6] block: loop: prepare for supporing direct IO Ming Lei
2015-08-06 8:42 ` [PATCH v9 5/6] block: loop: introduce ioctl command of LOOP_SET_DIRECT_IO Ming Lei
2015-08-06 8:42 ` [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei
2015-08-07 7:43 ` Christoph Hellwig
2015-08-07 8:25 ` Ming Lei
2015-08-09 6:44 ` Christoph Hellwig
2015-08-09 13:04 ` Ming Lei
2015-08-09 13:44 ` Christoph Hellwig
2015-08-09 14:27 ` Ming Lei
2015-08-09 23:41 ` Dave Chinner [this message]
2015-08-10 2:50 ` Ming Lei
2015-08-10 8:08 ` Christoph Hellwig
2015-08-10 14:33 ` Ming Lei
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=20150809234126.GA906@dastard \
--to=david@fromorbit.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dave.kleikamp@oracle.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=mpatlasov@parallels.com \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@zabbo.net \
/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.