Re: [PATCH v2 1/3] virtio_net: Split receive buffer alloc/add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, 10 Jan 2012 09:41:01 -0800, Mike Waychison <mikew@xxxxxxxxxx> wrote:
> In preparation for allocating receive buffers in the slow path without
> disabling NAPI, split the allocation and addition of receive buffers
> apart into two separate functions (per receive buffer type).
> 
> While here, move the vi->num accounting into the add functions.
> 
> Signed-off-by: Mike Waychison <mikew@xxxxxxxxxx>

Hi Mike...

        This exposes a nasty ugliness in the way virtio_net works.  We
allocate an skbuff for the small packet case, and just allocate the
pages for the large packet cases, and alloc the skbuff when we fill the
pages.

        I think all the allocators should return a populated skbuff;
this uses a bit more memory in theory, but should make the code simpler.
As an added bonus, your life should get much simpler for these patches.

I'll try to create such a patch tonight, but I'm busy finalizing my
linux.conf.au presentation, so it might take longer :(

Thanks,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Find Someone Nice]     [Video 4 Linux]     [Linux Resources]
Add to Google Powered by Linux