Re: help? looking for limits on in-flight write operations for virtio-blk

2014-08-26 Thread Stefan Hajnoczi
On Mon, Aug 25, 2014 at 8:42 PM, Chris Friesen chris.frie...@windriver.com wrote: I'm trying to figure out what controls the number if in-flight virtio block operations when running linux in qemu on top of a linux host. The problem is that we're trying to run as many VMs as possible, using

Re: help? looking for limits on in-flight write operations for virtio-blk

2014-08-26 Thread Chris Friesen
On 08/26/2014 04:34 AM, Stefan Hajnoczi wrote: On Mon, Aug 25, 2014 at 8:42 PM, Chris Friesen chris.frie...@windriver.com wrote: I'm trying to figure out if there are any limits on how high the inflight numbers can go, but I'm not having much luck. I was hopeful when I saw qemu calling

[PATCH 0/3] virtio: Clean up scatterlists and use the DMA API

2014-08-26 Thread Andy Lutomirski
This fixes virtio on Xen guests as well as on any other platform on which physical addresses don't match bus addresses. This can be tested with: virtme-run --xen xen --kimg arch/x86/boot/bzImage --console using virtme from here:

[PATCH 3/3] virtio_pci: Use the DMA API for virtqueues

2014-08-26 Thread Andy Lutomirski
A virtqueue is a coherent DMA mapping. Use the DMA API for it. This fixes virtio_pci on Xen. Signed-off-by: Andy Lutomirski l...@amacapital.net --- drivers/virtio/virtio_pci.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git

[PATCH 2/3] virtio_ring: Use DMA APIs

2014-08-26 Thread Andy Lutomirski
virtio_ring currently sends the device (usually a hypervisor) physical addresses of its I/O buffers. This is okay when DMA addresses and physical addresses are the same thing, but this isn't always the case. For example, this never works on Xen guests, and it is likely to fail if a physical

[PATCH 1/3] virtio_ring: Remove sg_next indirection

2014-08-26 Thread Andy Lutomirski
The only unusual thing about virtio's use of scatterlists is that two of the APIs accept scatterlists that might not be terminated. Using function pointers to handle this case is overkill; for_each_sg can do it. There's a small subtlely here: for_each_sg assumes that the provided count is

GET_RNG_SEED hypercall ABI? (Re: [PATCH v5 0/5] random,x86,kvm: Rework arch RNG seeds and get some from kvm)

2014-08-26 Thread Andy Lutomirski
hpa pointed out that the ABI that I chose (an MSR from the KVM range and a KVM cpuid bit) is unnecessarily KVM-specific. It would be nice to allocate an MSR that everyone involved can agree on and, rather than relying on a cpuid bit, just have the guest probe for the MSR. This leads to a few

Re: [PATCH 1/1] add selftest for virtio-net

2014-08-26 Thread Jason Wang
On 08/27/2014 09:45 AM, Hengjinxiao wrote: Selftest is an important part of network driver, this patch adds selftest for virtio-net, including loopback test, negotiate test and reset test. Loopback test checks whether virtio-net can send and receive packets normally. Negotiate test executes

Re: help? looking for limits on in-flight write operations for virtio-blk

2014-08-26 Thread Chris Friesen
On 08/26/2014 08:58 AM, Chris Friesen wrote: What I'd like to see (and may take a stab at implementing) is a cap on either inflight bytes or inflight IOPS. One complication is that this requires hooking into the completion path to update the stats (and possibly unblock the I/O code) when an