Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1203709
| From | Dave Chinner <david@fromorbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v9 6/6] block: loop: support DIO & AIO |
| Date | 2015-08-10 01:50 +0200 |
| Message-ID | <pVIvM-4ph-17@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <pULcm-2og-9@gated-at.bofh.it> <pVsAG-6A9-13@gated-at.bofh.it> <pVywp-6Xi-5@gated-at.bofh.it> <pVz97-7GV-3@gated-at.bofh.it> <pVzLP-dy-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v9 0/6] block: loop: improve loop with AIO Ming Lei <ming.lei@canonical.com> - 2015-08-06 10:50 +0200
[PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-08-06 10:50 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Christoph Hellwig <hch@infradead.org> - 2015-08-07 09:50 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-08-07 10:30 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Christoph Hellwig <hch@infradead.org> - 2015-08-09 08:50 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-08-09 15:10 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Christoph Hellwig <hch@infradead.org> - 2015-08-09 15:50 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-08-09 16:30 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Dave Chinner <david@fromorbit.com> - 2015-08-10 01:50 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-08-10 05:00 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Christoph Hellwig <hch@infradead.org> - 2015-08-10 10:10 +0200
Re: [PATCH v9 6/6] block: loop: support DIO & AIO Ming Lei <ming.lei@canonical.com> - 2015-08-10 16:40 +0200
csiph-web