Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [PATCH 1/2] virtio-scsi: first version | Date | Fri, 02 Dec 2011 10:59:42 +1030 |
| |
On Thu, 01 Dec 2011 09:36:51 +0100, Paolo Bonzini <pbonzini@redhat.com> wrote: > On 12/01/2011 07:33 AM, Sasha Levin wrote: > > On Wed, 2011-11-30 at 14:54 +0100, Paolo Bonzini wrote: > >> + /* We need to know how many segments before we allocate. > >> + * We need an extra sg elements at head and tail. > >> + */ > >> + sg_elems = virtscsi_config_get(vdev, seg_max); > > > > Maybe default to one if not specified (=0), like in virtio-blk. > > Good idea. Though with sg_elems=1 it is insanely slow.
And a bit over-conservative. If they don't specify a max, you can pick a number. Make sure it fits in the ring though :)
Thanks, Rusty.
| |