examples/vhost: reduce number of hugepages needed
PATCH 1/1 examples/vhost: reduce number of hugepages needed
Change MAX_QUEUES to 128 to reduce the number of hugepages required by the vhost-switch program.
--- examples/vhost/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
examples/vhost/main.c +3 -2
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,8 @@#include "main.h" -#define MAX_QUEUES 512 +/* decrease MAX_QUEUES from 512 to reduce number of hugepages needed */ +#define MAX_QUEUES 128/* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1
Signature · 1 line
2.6.3
Quoted 22 lines · Bernard Iremonger
Change
MAX_QUEUESto 128 to reduce the number of hugepages required by the vhost-switch program.Signed-off-by Bernard Iremonger <[email protected]>--- examples/vhost/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)examples/vhost/main.c +1
-1@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
examples/vhost/main.c line 56
Quoted 5 lines
examples/vhost/main.c +1
-1@@ -53,7 +53,8 @@#include "main.h" -#define MAX_QUEUES 512 +/* decrease MAX_QUEUES from 512 to reduce number of hugepages needed */
Minor nit: I would suggest to simply remove this comment, which might be a bit confusing without the content (that 512 would let vhost-switch fail to start if given memory is small).
Otherwise, this patch looks good to me.
Thanks.
--yliu
Quoted 6 lines
examples/vhost/main.c +1
-0+#define MAX_QUEUES 128/* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1Signature · 1 line
2.6.3
Hi Yuanhan,
<snip>
Quoted 21 lines
Quoted 9 lines
/*-
* BSD LICENSE
*- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved.*
* Redistribution and use in source and binary forms, with or withoutexamples/vhost/main.c line 56
Quoted 5 lines
examples/vhost/main.c +1
-1@@ -53,7 +53,8 @@#include "main.h" -#define MAX_QUEUES 512 +/* decrease MAX_QUEUES from 512 to reduce number of hugepages needed
Review line 57
Quoted 1 line
(quoted diff) +1
-0+*/Minor nit: I would suggest to simply remove this comment, which might be a bit confusing without the content (that 512 would let vhost-switch fail to start if given memory is small).
Quoted 8 lines
Otherwise, this patch looks good to me.
Acked-by Yuanhan Liu <[email protected]>Thanks.
--yliu
<snip>
I will remove the comment.
Can I keep your ack.
Regards,
Bernard.
Quoted 29 lines · Bernard
Hi Yuanhan,
<snip>
Quoted 25 lines
Quoted 9 lines
/*-
* BSD LICENSE
*- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved.*
* Redistribution and use in source and binary forms, with or withoutexamples/vhost/main.c line 56
Quoted 5 lines
examples/vhost/main.c +1
-1@@ -53,7 +53,8 @@#include "main.h" -#define MAX_QUEUES 512 +/* decrease MAX_QUEUES from 512 to reduce number of hugepages needed
Review line 57
Quoted 1 line
(quoted diff) +1
-0+*/Minor nit: I would suggest to simply remove this comment, which might be a bit confusing without the content (that 512 would let vhost-switch fail to start if given memory is small).
Otherwise, this patch looks good to me.
Acked-by Yuanhan Liu <[email protected]>
Quoted 8 lines
Quoted 4 lines
Thanks.
--yliu<snip>
I will remove the comment.
Can I keep your ack.
Thanks and sure, you can always keep one's ACK if you just need fix some minor nits when he has already given the ack.
--yliu
PATCH v2 1/1 examples/vhost: reduce number of hugepages needed
In reply to Bernard IremongerChange MAX_QUEUES from 512 to 128 to reduce the number of hugepages required by the vhost-switch program.
Changes in v2:
remove comment added before #define MAX_QUEUES in v1 patch.
--- examples/vhost/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
examples/vhost/main.c +2 -2
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@#include "main.h" -#define MAX_QUEUES 512 +#define MAX_QUEUES 128/* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1
Signature · 1 line
2.6.3
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Bernard Iremonger
Sent: Thursday, December 10, 2015 1:53 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH v2] examples/vhost: reduce number of hugepages needed
Quoted 8 lines
Change
MAX_QUEUESfrom 512 to 128 to reduce the number of hugepages required by the vhost-switch program.Changes in v2:
remove comment added before #defineMAX_QUEUESin v1 patch.Signed-off-by Bernard Iremonger <[email protected]>Acked-by Yuanhan Liu <[email protected]>
Wasn't it increased a while ago, because someone complained that 128 queues might not be enough on FVL?
Quoted 1 line
From git log I can see that it was first increased from 128 to 256,
then from 256 to 512.
The reason mentioned - HW that has bigger number of queues. Isn't it not the case anymore?
If yes, why?
BTW, shouldn't it be then at least:
+#ifndef MAX_QUEUES
+#define MAX_QUEUES 128
+#endif
So people can just do -D MAX_QUEUES=X at build time if they like(need) to. Konstantin
Quoted 28 lines
--- examples/vhost/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)examples/vhost/main.c +2
-3@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@#include "main.h" -#define MAX_QUEUES 512 +#define MAX_QUEUES 128/* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1 --2.6.3
Hi Konstantin,
<snip>
Quoted 27 lines
Quoted 11 lines
Subject: [dpdk-dev] [PATCH v2] examples/vhost: reduce number of hugepages needed
Change
MAX_QUEUESfrom 512 to 128 to reduce the number of hugepages required by the vhost-switch program.Changes in v2:
remove comment added before #defineMAX_QUEUESin v1 patch.Signed-off-by Bernard Iremonger <[email protected]>Acked-by Yuanhan Liu <[email protected]>Wasn't it increased a while ago, because someone complained that 128 queues might not be enough on FVL?
From git log I can see that it was first increased from 128 to 256, then from 256 to 512.
The reason mentioned - HW that has bigger number of queues.
Isn't it not the case anymore?
If yes, why?BTW, shouldn't it be then at least:
(quoted diff) +3
-0+#ifndef MAX_QUEUES +#define MAX_QUEUES 128 +#endif
Quoted 3 lines
So people can just do -D MAX_QUEUES=X at build time if they like(need) to. Konstantin
<snip>
I will add #ifndef MAX_QUEUES and #endif.
Regards,
Bernard.
Quoted 32 lines · Konstantin
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Bernard Iremonger
Sent: Thursday, December 10, 2015 1:53 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH v2] examples/vhost: reduce number of hugepages neededQuoted 8 lines
Change
MAX_QUEUESfrom 512 to 128 to reduce the number of hugepages required by the vhost-switch program.Changes in v2:
remove comment added before #defineMAX_QUEUESin v1 patch.Signed-off-by Bernard Iremonger <[email protected]>Acked-by Yuanhan Liu <[email protected]>Wasn't it increased a while ago, because someone complained that 128 queues might not be enough on FVL?
From git log I can see that it was first increased from 128 to 256,
then from 256 to 512.
The reason mentioned - HW that has bigger number of queues. Isn't it not the case anymore?
If yes, why?BTW, shouldn't it be then at least:
(quoted diff) +3
-0+#ifndef MAX_QUEUES +#define MAX_QUEUES 128 +#endif
Quoted 1 line
So people can just do -D MAX_QUEUES=X at build time if they like(need) to.
Being subject to constant changes back and forth suggests this really should be a runtime tunable rather than build time constant.
- Panu -
PATCH v3 1/1 examples/vhost: reduce number of hugepages needed
In reply to Bernard IremongerAdd #ifndef MAX_QUEUES to change MAX_QUEUES at compile time if needed. Change MAX_QUEUES from 512 to 128 to reduce the number of hugepages required by the vhost-switch program.
To change MAX_QUEUES add '-D MAX_QUEUES=512' to the EXTRA_CFLAGS variable, before building the application.
Changes in v3:
Added #ifndef MAX_QUEUES line before #define MAX_QUEUES 128
Changes in v2:
remove comment added before #define MAX_QUEUES in v1 patch.
--- examples/vhost/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
examples/vhost/main.c +4 -2
@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,9 @@#include "main.h" -#define MAX_QUEUES 512 +#ifndef MAX_QUEUES +#define MAX_QUEUES 128 +#endif /* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1
Signature · 1 line
2.6.3
Quoted 42 lines
-----Original Message-----
From: Iremonger, Bernard
Sent: Thursday, December 10, 2015 3:49 PM
To: [email protected]
Cc: Xie, Huawei; [email protected]; Ananyev, Konstantin; Iremonger, Bernard
Subject: [PATCH v3] examples/vhost: reduce number of hugepages neededAdd #ifndef
MAX_QUEUESto changeMAX_QUEUESat compile time if needed. ChangeMAX_QUEUESfrom 512 to 128 to reduce the number of hugepages required by the vhost-switch program.To change
MAX_QUEUESadd '-D MAX_QUEUES=512' to theEXTRA_CFLAGSvariable, before building the application.Changes in v3:
Added #ifndefMAX_QUEUESline before #defineMAX_QUEUES128Changes in v2:
remove comment added before #defineMAX_QUEUESin v1 patch.Signed-off-by Bernard Iremonger <[email protected]>--- examples/vhost/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)examples/vhost/main.c +1
-1@@ -1,7 +1,7 @@/*- * BSD LICENSE * -* Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +* Copyright(c) 2010-2015 Intel Corporation. All rights reserved. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,9 @@
examples/vhost/main.c
Quoted 10 lines
examples/vhost/main.c +3
-2#include "main.h" -#define MAX_QUEUES 512 +#ifndef MAX_QUEUES +#define MAX_QUEUES 128 +#endif /* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1 --
Quoted 1 line
2.6.3
Thomas Monjalon
AppliedQuoted 10 lines
Quoted 10 lines
Add #ifndef
MAX_QUEUESto changeMAX_QUEUESat compile time if needed. ChangeMAX_QUEUESfrom 512 to 128 to reduce the number of hugepages required by the vhost-switch program.To change
MAX_QUEUESadd '-D MAX_QUEUES=512' to theEXTRA_CFLAGSvariable, before building the application.Changes in v3:
Added #ifndefMAX_QUEUESline before #defineMAX_QUEUES128
Quoted 6 lines
Quoted 4 lines
Changes in v2:
remove comment added before #defineMAX_QUEUESin v1 patch.Signed-off-by Bernard Iremonger <[email protected]>
Applied, thanks