Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-10 Thread Paolo Bonzini
Il 08/01/2013 01:12, Rusty Russell ha scritto: Unfortunately, that cannot work because not all architectures support chained scatterlists. WHAT? I can't figure out what an arch needs to do to support this? It needs to use the iterator functions in its DMA driver. But we don't care

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-07 Thread Paolo Bonzini
Il 07/01/2013 01:02, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 02/01/2013 06:03, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-07 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 07/01/2013 01:02, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 02/01/2013 06:03, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-06 Thread Rusty Russell
Wanlong Gao gaowanl...@cn.fujitsu.com writes: On 01/02/2013 01:03 PM, Rusty Russell wrote: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-06 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: Il 02/01/2013 06:03, Rusty Russell ha scritto: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-03 Thread Wanlong Gao
On 01/02/2013 01:03 PM, Rusty Russell wrote: Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained scatterlists: the buffers must be provided as an

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-01 Thread Rusty Russell
Paolo Bonzini pbonz...@redhat.com writes: The virtqueue_add_buf function has two limitations: 1) it requires the caller to provide all the buffers in a single call; 2) it does not support chained scatterlists: the buffers must be provided as an array of struct scatterlist; Chained

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Paolo Bonzini
Il 19/12/2012 11:47, Stefan Hajnoczi ha scritto: On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: +/** + * virtqueue_start_buf - start building buffer for the other end + * @vq: the struct virtqueue we're talking about. + * @buf: a struct keeping the state of the buffer + *

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Michael S. Tsirkin
On Wed, Dec 19, 2012 at 01:04:08PM +0100, Paolo Bonzini wrote: Il 19/12/2012 11:47, Stefan Hajnoczi ha scritto: On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: +/** + * virtqueue_start_buf - start building buffer for the other end + * @vq: the struct virtqueue we're talking

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Stefan Hajnoczi
On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: +/** + * virtqueue_start_buf - start building buffer for the other end + * @vq: the struct virtqueue we're talking about. + * @buf: a struct keeping the state of the buffer + * @data: the token identifying the buffer. + * @count:

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Michael S. Tsirkin
Some comments without arguing about whether the performance benefit is worth it. On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: diff --git a/include/linux/virtio.h b/include/linux/virtio.h index cf8adb1..39d56c4 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 14:36, Michael S. Tsirkin ha scritto: Some comments without arguing about whether the performance benefit is worth it. On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: diff --git a/include/linux/virtio.h b/include/linux/virtio.h index cf8adb1..39d56c4 100644 ---

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 02:43:51PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:36, Michael S. Tsirkin ha scritto: Some comments without arguing about whether the performance benefit is worth it. On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: diff --git

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 14:59, Michael S. Tsirkin ha scritto: Can't we track state internally to the virtqueue? Exposing it seems to buy us nothing since you can't call add_buf between start and end anyway. I wanted to keep the state for these functions separate from the rest. I don't think it makes

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 03:32:15PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:59, Michael S. Tsirkin ha scritto: Can't we track state internally to the virtqueue? Exposing it seems to buy us nothing since you can't call add_buf between start and end anyway. I wanted to keep the state