Re: [PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-30 Thread Rusty Russell
Rusty Russell writes: > "Michael S. Tsirkin" writes: >> On Thu, May 29, 2014 at 04:56:45PM +0930, Rusty Russell wrote: >>> virtqueue_add() populates the virtqueue descriptor table from the sgs >>> given. If it uses an indirect descriptor table, then it puts a single >>> descriptor in the descrip

Re: [PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-29 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Thu, May 29, 2014 at 04:56:45PM +0930, Rusty Russell wrote: >> virtqueue_add() populates the virtqueue descriptor table from the sgs >> given. If it uses an indirect descriptor table, then it puts a single >> descriptor in the descriptor table pointing to the kma

Re: [PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-29 Thread Michael S. Tsirkin
On Thu, May 29, 2014 at 08:35:58PM +0930, Rusty Russell wrote: > Peter Zijlstra writes: > > On Thu, May 29, 2014 at 04:56:45PM +0930, Rusty Russell wrote: > >> Before: > >>gcc 4.8.2: virtio_blk: stack used = 392 > >>gcc 4.6.4: virtio_blk: stack used = 480 > >> > >> After: > >>gcc 4.8.

Re: [PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-29 Thread Michael S. Tsirkin
On Thu, May 29, 2014 at 04:56:45PM +0930, Rusty Russell wrote: > virtqueue_add() populates the virtqueue descriptor table from the sgs > given. If it uses an indirect descriptor table, then it puts a single > descriptor in the descriptor table pointing to the kmalloc'ed indirect > table where the

Re: [PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-29 Thread Rusty Russell
Peter Zijlstra writes: > On Thu, May 29, 2014 at 04:56:45PM +0930, Rusty Russell wrote: >> Before: >> gcc 4.8.2: virtio_blk: stack used = 392 >> gcc 4.6.4: virtio_blk: stack used = 480 >> >> After: >> gcc 4.8.2: virtio_blk: stack used = 408 >> gcc 4.6.4: virtio_blk: stack used

Re: [PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-29 Thread Peter Zijlstra
On Thu, May 29, 2014 at 04:56:45PM +0930, Rusty Russell wrote: > virtqueue_add() populates the virtqueue descriptor table from the sgs > given. If it uses an indirect descriptor table, then it puts a single > descriptor in the descriptor table pointing to the kmalloc'ed indirect > table where the

[PATCH 4/4] virtio_ring: unify direct/indirect code paths.

2014-05-29 Thread Rusty Russell
virtqueue_add() populates the virtqueue descriptor table from the sgs given. If it uses an indirect descriptor table, then it puts a single descriptor in the descriptor table pointing to the kmalloc'ed indirect table where the sg is populated. Previously vring_add_indirect() did the allocation an