lkml.org 
[lkml]   [2012]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 15/21] loop: use aio to perform io on the underlying file
On 04/20/2012 10:52 AM, Zach Brown wrote:
> On 04/20/2012 11:20 AM, Jeff Moyer wrote:
>> Dave Kleikamp<dave.kleikamp@oracle.com> writes:
>>
>>> On 04/20/2012 09:48 AM, Maxim V. Patlasov wrote:
>>>> On 03/30/2012 07:43 PM, Dave Kleikamp wrote:
>>>>> From: Zach Brown<zab@zabbo.net>
>>>>>
>>>>> This uses the new kernel aio interface to process loopback IO by
>>>>> submitting concurrent direct aio. Previously loop's IO was serialized
>>>>> by synchronous processing in a thread.
>>>>>
>>>>
>>>> The patch ignores REQ_FLUSH bit of bi_rw. Is it simply overlook?
>>>
>>> Good question. Since the loop device is sending only direct IO requests,
>>> it shouldn't be necessary to explicitly flush page cache, but REQ_FLUSH
>>
>> REQ_FLUSH isn't about the page cache, it's about flushing the volatile
>> disk write cache. You need to handle that.
>
> I guess O_DIRECT doesn't routinely issue flushes simply because it's too
> expensive? Apps that care about consistent IO and O_DIRECT are expected
> to not have writeback caching enabled? 'cause there's no way they're
> issuing syncs themselves.

If we weren't using aio, we might be okay, but we don't know that any
prior asynchronous request has completed.
>
> So yeah, I'd agree that the loop code should be reworked a bit so that
> both the filebacked and aio methods call vfs_sync() when they see
> REQ_FLUSH.

It's an easy fix. I don't anticipate that it will hurt performance too
badly.

>
> Bleh.
>
> - z
> (Sorry, no real time to dig into this now. Lots more time in two months!)


\
 
 \ /
  Last update: 2012-04-20 17:59    [W:0.785 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site