Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Rusty Russell
Asias He as...@redhat.com writes: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. Hmm, are you talking about virtqueue_enable_cb_delayed()? Just the fact that virtqueue_disable_cb() prevents updates of used_index, and then we do the update in

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Asias He
On 09/28/2012 02:08 PM, Rusty Russell wrote: Asias He as...@redhat.com writes: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. Hmm, are you talking about virtqueue_enable_cb_delayed()? Just the fact that virtqueue_disable_cb() prevents

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-09-28 Thread Michael S. Tsirkin
On Thu, Sep 27, 2012 at 09:40:03AM +0930, Rusty Russell wrote: I forgot about the cool hack which MST put in to defer event updates using disable_cb/enable_cb. I considered sticking some invalid value in event index on disable but in my testing it did not seem to give any gain, and knowing

[PATCH 0/3] virtio-net: inline header support

2012-09-28 Thread Michael S. Tsirkin
Thinking about Sasha's patches, we can reduce ring usage for virtio net small packets dramatically if we put virtio net header inline with the data. This can be done for free in case guest net stack allocated extra head room for the packet, and I don't see why would this have any downsides. Even

[PATCH 1/3] virtio: add API to query ring capacity

2012-09-28 Thread Michael S. Tsirkin
It's sometimes necessary to query ring capacity after dequeueing a buffer. Add an API for this. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_ring.c | 19 +++ include/linux/virtio.h | 2 ++ 2 files changed, 21 insertions(+) diff --git

[PATCH 2/3] virtio-net: correct capacity math on ring full

2012-09-28 Thread Michael S. Tsirkin
Capacity math on ring full is wrong: we are looking at num_sg but that might be optimistic because of indirect buffer use. The implementation also penalizes fast path with extra memory accesses for the benefit of ring full condition handling which is slow path. It's easy to query ring capacity

[PATCH 3/3] virtio-net: put virtio net header inline with data

2012-09-28 Thread Michael S. Tsirkin
For small packets we can simplify xmit processing by linearizing buffers with the header: most packets seem to have enough head room we can use for this purpose. Since existing hypervisors require that header is the first s/g element, we need a feature bit for this. Signed-off-by: Michael S.

[PATCH qemu] virtio-net: add feature bit for any header s/g

2012-09-28 Thread Michael S. Tsirkin
Old qemu versions required that 1st s/g entry is the header. My recent patchset titled virtio-net: iovec handling cleanup removed this limitation but a feature bit is needed so guests know it's safe to lay out header differently. This patch applies on top and adds such a feature bit. virtio net

Re: [PATCHv6 0/3] virtio_console: Add rproc_serial device

2012-09-28 Thread Amit Shah
On (Tue) 25 Sep 2012 [15:47:14], sjur.brandel...@stericsson.com wrote: From: Sjur Brændeland sjur.brandel...@stericsson.com I thought rebasing rproc_serial to linux-next was going to be trivial. But when starting the merge I realized that I had to refactor the the patches from Masami