From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] kvm tools: Support virtio indirect buffers Date: Mon, 28 Nov 2011 23:05:21 +0200 Message-ID: <1322514321.3629.12.camel@lappy> References: <1322502867-28812-1-git-send-email-levinsasha928@gmail.com> <1322511443.3629.7.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, Rusty Russell To: Pekka Enberg Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:47854 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821Ab1K1VFc (ORCPT ); Mon, 28 Nov 2011 16:05:32 -0500 Received: by faas1 with SMTP id s1so3026770faa.19 for ; Mon, 28 Nov 2011 13:05:31 -0800 (PST) In-Reply-To: <1322511443.3629.7.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 2011-11-28 at 22:17 +0200, Sasha Levin wrote: > On Mon, 2011-11-28 at 20:49 +0200, Pekka Enberg wrote: > > On Mon, Nov 28, 2011 at 7:54 PM, Sasha Levin wrote: > > > Indirect buffers are ring descriptors which point to more (even more) > > > descriptors. > > > > > > This can be used to increase the effective ring capacity, which helps the > > > guest to batch large requests - very useful for blk devices. > > > > > > This patch also enables indirect buffers for virtio-net and virtio-blk. > > > > > > The patch is based on the lguest's code which does the same. > > > > > > Signed-off-by: Sasha Levin > > > > In what exact way is it useful? Improved throughput? Will this have > > negative impact on virtio block or virtio net latency? > > The total size of requests is limited by the size of the virtio ring. > This makes it hard to squeeze large requests (like the ones you usually > see with blk devices) into the ring. This patch simply makes each entry > in the virtio ring point to another descriptor list, thus it allows to > squeeze much more requests into a singe virtio ring. > > It shouldn't hurt latency. > > I tried getting benchmarks with it, but the results I get from fio are > all over the place and I can't seem to get a steady result (bad sign for > my poor spindle disk). btw, on an unrelated subject, I think that with this patch we've fully covered the virtio spec, and as far as I know it's the first userspace implementation which covers the entire spec :) -- Sasha.