[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVMBqNQAb6iCm8TOWDyFmgPnjvACFJ9wvWEeCaKiZAB22g@mail.gmail.com>
Date: Sun, 9 Aug 2015 22:50:41 -0400
From: Ming Lei <ming.lei@...onical.com>
To: Dave Chinner <david@...morbit.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Jens Axboe <axboe@...nel.dk>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Dave Kleikamp <dave.kleikamp@...cle.com>,
Zach Brown <zab@...bo.net>,
Maxim Patlasov <mpatlasov@...allels.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH v9 6/6] block: loop: support DIO & AIO
On Sun, Aug 9, 2015 at 7:41 PM, Dave Chinner <david@...morbit.com> wrote:
> 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@...radead.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.
No problem, and we still may improve it in future.
Christoph, could you share your idea again about this approch?
If you still don't think it is good to switch between buffered I/O
and direct I/O, I will not do that in next post.
Thanks,
Ming
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@...morbit.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists