[SLOF] [PATCH] virtio-net: use common receive buffer for devices
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Aug 2 18:20:13 AEST 2017
Thomas Huth <thuth at redhat.com> writes:
> On 01.08.2017 08:39, Nikunj A Dadhania wrote:
>> Found that virtio-net is using a around 200K receive buffer per device, if we
>> connect more than 40 virtio-net devices the heap(8MB) gets over. Because of
>> which allocation starts failing and the VM does not boot.
>> Use common receive buffer for all the virtio-net devices. This will reduce the
>> memory requirement per virtio-net device in slof.
> Not sure whether this is a really good idea... I think theoretically an
> OF client could open multiple network devices and use them in parallel
True, but looking at the virtio-net driver, i dont think it supports
multiple network devices. I see the global struct virtio_device being
used throughout the driver.
> and then the devices would destroy their shared receive buffers mutually.
> Maybe you could change the code so that the buffers are only allocated
> when the device is opened, and released again when the device is closed
This should be possible by re-designing the driver to handle multiple
device open scenario. Let me have a quick look if this can be done.
More information about the SLOF