From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Hajnoczi Subject: Re: AIO requests may be disordered by Qemu-kvm iothread with disk cache=writethrough, Bug or Feature? Date: Wed, 14 Oct 2015 10:32:35 +0100 Message-ID: <20151014093235.GA14874@stefanha-thinkpad> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm To: "charlie.song" Return-path: Received: from mail-wi0-f179.google.com ([209.85.212.179]:37997 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932264AbbJNNvj (ORCPT ); Wed, 14 Oct 2015 09:51:39 -0400 Received: by wieq12 with SMTP id q12so84430883wie.1 for ; Wed, 14 Oct 2015 06:51:38 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Oct 08, 2015 at 07:59:56PM +0800, charlie.song wrote: > We recently try to use Linux AIO from guest OS and find that the IOthread mechanism of Qemu-KVM will reorder I/O requests from guest OS > even when the AIO write requests are issued from a single thread in order. This does not happen on the host OS however. I think you are describing a situation where a guest submits multiple overlapping I/O requests at the same time. virtio-blk does not guarantee a specific request ordering, so the application needs to wait for request completion if ordering matters. io_submit(2) also does not make guarantees about ordering. Stefan