Re: [PATCH 1/2] virtio-scsi: first version

From: Rusty Russell
Date: Thu Dec 01 2011 - 20:11:05 EST


On Thu, 01 Dec 2011 09:36:51 +0100, Paolo Bonzini <pbonzini@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/