[dpdk-dev] examples/vhost: reduce number of hugepages needed
Commit Message
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(-)
Comments
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
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.
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
@@ -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