lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <x49aa26wedf.fsf@segfault.boston.devel.redhat.com>
Date:	Fri, 20 Apr 2012 12:35:08 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Zach Brown <zab@...bo.net>
Cc:	Dave Kleikamp <dave.kleikamp@...cle.com>,
	"Maxim V. Patlasov" <mpatlasov@...allels.com>,
	"linux-fsdevel\@vger.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 15/21] loop: use aio to perform io on the underlying file

Zach Brown <zab@...bo.net> writes:

> On 04/20/2012 11:20 AM, Jeff Moyer wrote:
>> Dave Kleikamp<dave.kleikamp@...cle.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@...bo.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?  

Bypassing the page cache is different from bypassing the underlying
device's cache.  O_DIRECT does not mean "straight to platter".

> 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.

They most certainly should be!  The app should be written with the
assumption that there is a write-back cache on the storage.  Turning
those flushes into noops is an optimization the OS performs.  See this
lwn article: http://lwn.net/Articles/457667/.

Cheers,
Jeff
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ