qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2] net: reduce the unnecessary memory allocatio


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH V2] net: reduce the unnecessary memory allocation of multiqueue
Date: Mon, 25 Feb 2013 16:20:29 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Feb 22, 2013 at 11:15:06PM +0800, Jason Wang wrote:
> Edivaldo reports a problem that the array of NetClientState in NICState is too
> large - MAX_QUEUE_NUM(1024) which will wastes memory even if multiqueue is not
> used.
> 
> Instead of static arrays, solving this issue by allocating the queues on 
> demand
> for both the NetClientState array in NICState and VirtIONetQueue array in
> VirtIONet.
> 
> Tested by myself, with single virtio-net-pci device. The memory allocation is
> almost the same as when multiqueue is not merged.
> 
> Cc: Edivaldo de Araujo Pereira <address@hidden>
> Cc: address@hidden
> Signed-off-by: Jason Wang <address@hidden>
> ---
> Changes from V1:
> - Fix use after free (Stefan).
> ---
>  hw/virtio-net.c   |    6 ++++--
>  include/net/net.h |    2 +-
>  net/net.c         |   19 +++++++++----------
>  3 files changed, 14 insertions(+), 13 deletions(-)

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]