qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH RESEND for 1.4-stable] net: reduce memory allocation


From: Jason Wang
Subject: [Qemu-devel] [PATCH RESEND for 1.4-stable] net: reduce memory allocation when multiqueue is not used
Date: Wed, 20 Feb 2013 18:11:33 +0800

Edivaldo reports a problem that the array of NetClientState in NICState is too
large - MAX_QUEUE_NUM(1024) which will waste memory even if multiqueue is not
used.

For 1.4 we can just solve this by reduce the MAX_QUEUE_NUM to 8 which is the
same as the current kernel (3.8+) tap queue limit. For 1.5, we will use dynamic
allocation instead.

Cc: Edivaldo de Araujo Pereira <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
RESEND since the previous mail misses the list.
---
 include/net/net.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/net/net.h b/include/net/net.h
index 43a045e..cdffc34 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -9,7 +9,7 @@
 #include "migration/vmstate.h"
 #include "qapi-types.h"
 
-#define MAX_QUEUE_NUM 1024
+#define MAX_QUEUE_NUM 8
 
 struct MACAddr {
     uint8_t a[6];
-- 
1.7.1




reply via email to

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