Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocationscheme

From: Chris Wright
Date: Thu Oct 09 2008 - 11:36:20 EST


* Rusty Russell (rusty@xxxxxxxxxxxxxxx) wrote:
> On Thursday 09 October 2008 06:34:59 Mark McLoughlin wrote:
> > From: Herbert Xu <herbert.xu@xxxxxxxxxx>
> >
> > If segmentation offload is enabled by the host, we currently allocate
> > maximum sized packet buffers and pass them to the host. This uses up
> > 20 ring entries, allowing us to supply only 20 packet buffers to the
> > host with a 256 entry ring. This is a huge overhead when receiving
> > small packets, and is most keenly felt when receiving MTU sized
> > packets from off-host.
>
> There are three approaches we should investigate before adding YA feature.
> Obviously, we can simply increase the number of ring entries.

Tried that, it didn't help much. I don't have my numbers handy, but
levelled off at about 512 and was a modest boost. It's still wasteful
to preallocate like that on the off-chance it's a large packet.

thanks,
-chris
--
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/