All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] examples/vhost: reduce number of hugepages needed
@ 2015-12-10 12:19 Bernard Iremonger
  2015-12-10 12:59 ` Yuanhan Liu
  2015-12-10 13:53 ` [PATCH v2] " Bernard Iremonger
  0 siblings, 2 replies; 11+ messages in thread
From: Bernard Iremonger @ 2015-12-10 12:19 UTC (permalink / raw)
  To: dev

Change MAX_QUEUES to 128 to reduce the number of hugepages required
by the vhost-switch program.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 examples/vhost/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index b30f1bd..8fb0adb 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -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
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] examples/vhost: reduce number of hugepages needed
  2015-12-10 12:19 [PATCH] examples/vhost: reduce number of hugepages needed Bernard Iremonger
@ 2015-12-10 12:59 ` Yuanhan Liu
  2015-12-10 13:26   ` Iremonger, Bernard
  2015-12-10 13:53 ` [PATCH v2] " Bernard Iremonger
  1 sibling, 1 reply; 11+ messages in thread
From: Yuanhan Liu @ 2015-12-10 12:59 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: dev

On Thu, Dec 10, 2015 at 12:19:31PM +0000, Bernard Iremonger wrote:
> Change MAX_QUEUES to 128 to reduce the number of hugepages required
> by the vhost-switch program.
> 
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
>  examples/vhost/main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index b30f1bd..8fb0adb 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -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 */

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 <yuanhan.liu@linux.intel.com>

Thanks.

	--yliu

> +#define MAX_QUEUES 128
>  
>  /* the maximum number of external ports supported */
>  #define MAX_SUP_PORTS 1
> -- 
> 2.6.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] examples/vhost: reduce number of hugepages needed
  2015-12-10 12:59 ` Yuanhan Liu
@ 2015-12-10 13:26   ` Iremonger, Bernard
  2015-12-10 13:34     ` Yuanhan Liu
  0 siblings, 1 reply; 11+ messages in thread
From: Iremonger, Bernard @ 2015-12-10 13:26 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dev

Hi Yuanhan,

<snip>

> >  /*-
> >   *   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
> > +*/
> 
> 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 <yuanhan.liu@linux.intel.com>
> 
> Thanks.
> 
> 	--yliu
> 
<snip>

I will remove the comment.
Can I keep your ack.

Regards,

Bernard.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] examples/vhost: reduce number of hugepages needed
  2015-12-10 13:26   ` Iremonger, Bernard
@ 2015-12-10 13:34     ` Yuanhan Liu
  0 siblings, 0 replies; 11+ messages in thread
From: Yuanhan Liu @ 2015-12-10 13:34 UTC (permalink / raw)
  To: Iremonger, Bernard; +Cc: dev

On Thu, Dec 10, 2015 at 01:26:14PM +0000, Iremonger, Bernard wrote:
> Hi Yuanhan,
> 
> <snip>
> 
> > >  /*-
> > >   *   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
> > > +*/
> > 
> > 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 <yuanhan.liu@linux.intel.com>
> > 
> > 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] examples/vhost: reduce number of hugepages needed
  2015-12-10 12:19 [PATCH] examples/vhost: reduce number of hugepages needed Bernard Iremonger
  2015-12-10 12:59 ` Yuanhan Liu
@ 2015-12-10 13:53 ` Bernard Iremonger
  2015-12-10 14:50   ` Ananyev, Konstantin
  2015-12-10 15:49   ` [PATCH v3] " Bernard Iremonger
  1 sibling, 2 replies; 11+ messages in thread
From: Bernard Iremonger @ 2015-12-10 13:53 UTC (permalink / raw)
  To: dev

Change 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.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 examples/vhost/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index b30f1bd..5ce5926 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] examples/vhost: reduce number of hugepages needed
  2015-12-10 13:53 ` [PATCH v2] " Bernard Iremonger
@ 2015-12-10 14:50   ` Ananyev, Konstantin
  2015-12-10 15:43     ` Iremonger, Bernard
  2015-12-11  9:05     ` Panu Matilainen
  2015-12-10 15:49   ` [PATCH v3] " Bernard Iremonger
  1 sibling, 2 replies; 11+ messages in thread
From: Ananyev, Konstantin @ 2015-12-10 14:50 UTC (permalink / raw)
  To: Iremonger, Bernard, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bernard Iremonger
> Sent: Thursday, December 10, 2015 1:53 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] examples/vhost: reduce number of hugepages needed
> 
> Change 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.
> 
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>


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:

+#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

> ---
>  examples/vhost/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index b30f1bd..5ce5926 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] examples/vhost: reduce number of hugepages needed
  2015-12-10 14:50   ` Ananyev, Konstantin
@ 2015-12-10 15:43     ` Iremonger, Bernard
  2015-12-11  9:05     ` Panu Matilainen
  1 sibling, 0 replies; 11+ messages in thread
From: Iremonger, Bernard @ 2015-12-10 15:43 UTC (permalink / raw)
  To: Ananyev, Konstantin, dev

Hi Konstantin,

<snip>

> > Subject: [dpdk-dev] [PATCH v2] examples/vhost: reduce number of
> > hugepages needed
> >
> > Change 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.
> >
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> > Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> 
> 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:
> 
> +#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
> 
<snip>

I will add #ifndef MAX_QUEUES and #endif.

Regards,

Bernard.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3] examples/vhost: reduce number of hugepages needed
  2015-12-10 13:53 ` [PATCH v2] " Bernard Iremonger
  2015-12-10 14:50   ` Ananyev, Konstantin
@ 2015-12-10 15:49   ` Bernard Iremonger
  2015-12-10 16:32     ` Ananyev, Konstantin
  1 sibling, 1 reply; 11+ messages in thread
From: Bernard Iremonger @ 2015-12-10 15:49 UTC (permalink / raw)
  To: dev

Add #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.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 examples/vhost/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index b30f1bd..2dcdacb 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -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
-- 
2.6.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] examples/vhost: reduce number of hugepages needed
  2015-12-10 15:49   ` [PATCH v3] " Bernard Iremonger
@ 2015-12-10 16:32     ` Ananyev, Konstantin
  2015-12-10 21:35       ` Thomas Monjalon
  0 siblings, 1 reply; 11+ messages in thread
From: Ananyev, Konstantin @ 2015-12-10 16:32 UTC (permalink / raw)
  To: Iremonger, Bernard, dev



> -----Original Message-----
> From: Iremonger, Bernard
> Sent: Thursday, December 10, 2015 3:49 PM
> To: dev@dpdk.org
> Cc: Xie, Huawei; yuanhan.liu@linux.intel.com; Ananyev, Konstantin; Iremonger, Bernard
> Subject: [PATCH v3] examples/vhost: reduce number of hugepages needed
> 
> Add #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.
> 
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> ---
>  examples/vhost/main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/vhost/main.c b/examples/vhost/main.c
> index b30f1bd..2dcdacb 100644
> --- a/examples/vhost/main.c
> +++ b/examples/vhost/main.c
> @@ -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
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.6.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3] examples/vhost: reduce number of hugepages needed
  2015-12-10 16:32     ` Ananyev, Konstantin
@ 2015-12-10 21:35       ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2015-12-10 21:35 UTC (permalink / raw)
  To: Iremonger, Bernard; +Cc: dev

> > Add #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.
> > 
> > Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] examples/vhost: reduce number of hugepages needed
  2015-12-10 14:50   ` Ananyev, Konstantin
  2015-12-10 15:43     ` Iremonger, Bernard
@ 2015-12-11  9:05     ` Panu Matilainen
  1 sibling, 0 replies; 11+ messages in thread
From: Panu Matilainen @ 2015-12-11  9:05 UTC (permalink / raw)
  To: Ananyev, Konstantin, Iremonger, Bernard, dev

On 12/10/2015 04:50 PM, Ananyev, Konstantin wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bernard Iremonger
>> Sent: Thursday, December 10, 2015 1:53 PM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH v2] examples/vhost: reduce number of hugepages needed
>>
>> Change 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.
>>
>> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
>> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
>
>
> 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:
>
> +#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.

Being subject to constant changes back and forth suggests this really 
should be a runtime tunable rather than build time constant.

	- Panu -

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-12-11  9:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 12:19 [PATCH] examples/vhost: reduce number of hugepages needed Bernard Iremonger
2015-12-10 12:59 ` Yuanhan Liu
2015-12-10 13:26   ` Iremonger, Bernard
2015-12-10 13:34     ` Yuanhan Liu
2015-12-10 13:53 ` [PATCH v2] " Bernard Iremonger
2015-12-10 14:50   ` Ananyev, Konstantin
2015-12-10 15:43     ` Iremonger, Bernard
2015-12-11  9:05     ` Panu Matilainen
2015-12-10 15:49   ` [PATCH v3] " Bernard Iremonger
2015-12-10 16:32     ` Ananyev, Konstantin
2015-12-10 21:35       ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.