From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [ANNOUNCE] Native Linux KVM tool v2 Date: Fri, 17 Jun 2011 08:45:25 -0500 Message-ID: <4DFB5A75.2060206@codemonkey.ws> References: <1308153214.7566.6.camel@jaguar> <4DFA88CC.6050306@codemonkey.ws> <1308272586.29421.5.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Avi Kivity , Andrew Morton , Linus Torvalds , Ingo Molnar , Prasad Joshi , Cyrill Gorcunov , Asias He To: Sasha Levin Return-path: In-Reply-To: <1308272586.29421.5.camel@lappy> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 06/16/2011 08:03 PM, Sasha Levin wrote: > On Thu, 2011-06-16 at 17:50 -0500, Anthony Liguori wrote: > Each virtio-blk device can process requests regardless of other > virtio-blk devices, which means that we can do parallel requests for > devices. > > Within each device, we support parallel requests in the sense that we do > vectored IO for each head (which may contain multiple blocks) in the > vring, we don't do multiple heads because when I've tried adding AIO A scatter/gather list isn't multiple requests, it's just one. So you handle one request at a time ATM. There's nothing with that, but there's no use in saying "we support it in the sense..." :-) > I've noticed that at most there are 2-3 possible heads - and since it > points to the same device it doesn't really help running them in > parallel. Sure it does. If you use the host page cache (and you do), then if you have two requests, A and B, and request A requires a disk access and request B can be satisfied from the page cache, then being able to submit both requests means that you can return B almost immediately instead of stalling out to finish A before starting B. Not to mention that modern disks work better with multiple in flight requests because they have their own cache and reordering algorithms in the drives cache. With RAID and higher end storage devices, a single device may map to multiple spindles. The only way to have them all spin at once is to submit parallel requests. Regards, Anthony Liguori