DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
@ 2014-12-04 12:40 Pablo de Lara
  2014-12-04 13:20 ` Thomas Monjalon
  2014-12-09 10:11 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
  0 siblings, 2 replies; 7+ messages in thread
From: Pablo de Lara @ 2014-12-04 12:40 UTC (permalink / raw)
  To: dev

Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
maximum number of cores is 128, which has increase
the total memory necessary for a rte_mempool structure,
as the per-lcore local cache has been doubled in size.
Therefore, eal_flags unit test was broken since it needed
to use more hugepages.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_eal_flags.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 6e2a8f2..0683041 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -55,7 +55,7 @@
 #ifdef RTE_LIBRTE_XEN_DOM0
 #define DEFAULT_MEM_SIZE "30"
 #else
-#define DEFAULT_MEM_SIZE "8"
+#define DEFAULT_MEM_SIZE "14"
 #endif
 #define mp_flag "--proc-type=secondary"
 #define no_hpet "--no-hpet"
-- 
1.7.4.1

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

* Re: [dpdk-dev] [PATCH] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
  2014-12-04 12:40 [dpdk-dev] [PATCH] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128 Pablo de Lara
@ 2014-12-04 13:20 ` Thomas Monjalon
  2014-12-05 15:57   ` De Lara Guarch, Pablo
  2014-12-09 10:11 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2014-12-04 13:20 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

> Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
> maximum number of cores is 128, which has increase
> the total memory necessary for a rte_mempool structure,
> as the per-lcore local cache has been doubled in size.
> Therefore, eal_flags unit test was broken since it needed
> to use more hugepages.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

When I check it in a VM, I still have a memory issue in test_invalid_vdev_flag().
Do you have an idea of the problem?

-- 
Thomas

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

* Re: [dpdk-dev] [PATCH] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
  2014-12-04 13:20 ` Thomas Monjalon
@ 2014-12-05 15:57   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 7+ messages in thread
From: De Lara Guarch, Pablo @ 2014-12-05 15:57 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, December 04, 2014 1:21 PM
> To: De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] app/test: fix memory needs after
> RTE_MAX_LCORE was increased to 128
> 
> > Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
> > maximum number of cores is 128, which has increase
> > the total memory necessary for a rte_mempool structure,
> > as the per-lcore local cache has been doubled in size.
> > Therefore, eal_flags unit test was broken since it needed
> > to use more hugepages.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> When I check it in a VM, I still have a memory issue in
> test_invalid_vdev_flag().
> Do you have an idea of the problem?

Sorry I did not have a VM by that time. Now I do :)
Apparently it needs more memory, as first thing DPDK does is 
reserving space in rte_malloc heap, which size is bigger in the VM.
By changing the memory needed to 18M, we can fix the unit test.
I am still not sure why within a VM we need more memory, though.

Thanks,
Pablo
> 
> --
> Thomas

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

* [dpdk-dev] [PATCH v2] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
  2014-12-04 12:40 [dpdk-dev] [PATCH] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128 Pablo de Lara
  2014-12-04 13:20 ` Thomas Monjalon
@ 2014-12-09 10:11 ` Pablo de Lara
  2014-12-10 14:40   ` Thomas Monjalon
  1 sibling, 1 reply; 7+ messages in thread
From: Pablo de Lara @ 2014-12-09 10:11 UTC (permalink / raw)
  To: dev

Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
maximum number of cores is 128, which has increase
the total memory necessary for a rte_mempool structure,
as the per-lcore local cache has been doubled in size.
Therefore, eal_flags unit test was broken since it needed
to use more hugepages.

Changes in v2: Increased memory to 18MB, as that is the
actual minimum memory necessary (depending on the physical memory segments,
DPDK may need less memory)

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_eal_flags.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 6e2a8f2..0a8269c 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -55,7 +55,7 @@
 #ifdef RTE_LIBRTE_XEN_DOM0
 #define DEFAULT_MEM_SIZE "30"
 #else
-#define DEFAULT_MEM_SIZE "8"
+#define DEFAULT_MEM_SIZE "18"
 #endif
 #define mp_flag "--proc-type=secondary"
 #define no_hpet "--no-hpet"
-- 
1.7.4.1

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

* Re: [dpdk-dev] [PATCH v2] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
  2014-12-09 10:11 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
@ 2014-12-10 14:40   ` Thomas Monjalon
  2014-12-11  1:11     ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2014-12-10 14:40 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

2014-12-09 10:11, Pablo de Lara:
> Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
> maximum number of cores is 128, which has increase
> the total memory necessary for a rte_mempool structure,
> as the per-lcore local cache has been doubled in size.
> Therefore, eal_flags unit test was broken since it needed
> to use more hugepages.
> 
> Changes in v2: Increased memory to 18MB, as that is the
> actual minimum memory necessary (depending on the physical memory segments,
> DPDK may need less memory)
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Independently of RTE_MAX_LCORE being increased to 128, I still have some
problems with test_invalid_vdev_flag().
First, DEFAULT_MEM_SIZE is not used in this function.
Also, even with your patch, I get this error in my VM:
	Cannot get hugepage information

But if this patch solves an issue for you, I guess it should be applied.
That said, I would appreciate a complete description of the commands
you use to launch this test in a VM (starting with the Qemu command).

Thanks
-- 
Thomas

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

* Re: [dpdk-dev] [PATCH v2] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
  2014-12-10 14:40   ` Thomas Monjalon
@ 2014-12-11  1:11     ` Thomas Monjalon
  2014-12-11  9:56       ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2014-12-11  1:11 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

2014-12-10 15:40, Thomas Monjalon:
> 2014-12-09 10:11, Pablo de Lara:
> > Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
> > maximum number of cores is 128, which has increase
> > the total memory necessary for a rte_mempool structure,
> > as the per-lcore local cache has been doubled in size.
> > Therefore, eal_flags unit test was broken since it needed
> > to use more hugepages.
> > 
> > Changes in v2: Increased memory to 18MB, as that is the
> > actual minimum memory necessary (depending on the physical memory segments,
> > DPDK may need less memory)
> > 
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Independently of RTE_MAX_LCORE being increased to 128, I still have some
> problems with test_invalid_vdev_flag().
> First, DEFAULT_MEM_SIZE is not used in this function.
> Also, even with your patch, I get this error in my VM:
> 	Cannot get hugepage information
> 
> But if this patch solves an issue for you, I guess it should be applied.
> That said, I would appreciate a complete description of the commands
> you use to launch this test in a VM (starting with the Qemu command).

Applied

I think we should try to improve this test to be able to run it everywhere.

Thanks
-- 
Thomas

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

* Re: [dpdk-dev] [PATCH v2] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128
  2014-12-11  1:11     ` Thomas Monjalon
@ 2014-12-11  9:56       ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 7+ messages in thread
From: De Lara Guarch, Pablo @ 2014-12-11  9:56 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, December 11, 2014 1:11 AM
> To: De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] app/test: fix memory needs after
> RTE_MAX_LCORE was increased to 128
> 
> 2014-12-10 15:40, Thomas Monjalon:
> > 2014-12-09 10:11, Pablo de Lara:
> > > Since commit b91c67e5a693211862aa7dc3b78630b4e856c2af,
> > > maximum number of cores is 128, which has increase
> > > the total memory necessary for a rte_mempool structure,
> > > as the per-lcore local cache has been doubled in size.
> > > Therefore, eal_flags unit test was broken since it needed
> > > to use more hugepages.
> > >
> > > Changes in v2: Increased memory to 18MB, as that is the
> > > actual minimum memory necessary (depending on the physical memory
> segments,
> > > DPDK may need less memory)
> > >
> > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >
> > Independently of RTE_MAX_LCORE being increased to 128, I still have
> some
> > problems with test_invalid_vdev_flag().
> > First, DEFAULT_MEM_SIZE is not used in this function.
> > Also, even with your patch, I get this error in my VM:
> > 	Cannot get hugepage information
> >
> > But if this patch solves an issue for you, I guess it should be applied.
> > That said, I would appreciate a complete description of the commands
> > you use to launch this test in a VM (starting with the Qemu command).
> 
> Applied
> 
> I think we should try to improve this test to be able to run it everywhere.

Sorry Thomas for not coming back to you earlier.
This is the qemu command I used:
qemu-kvm -cpu host -smp 8 -m 4G -monitor stdio -nographic -device e1000,vlan=1 -net user,vlan=1,hostfwd=::2222-:22 fedora-img.cow

And then I run the test using:

./x86_64-native-linuxapp-gcc/app/test -c ff -n 4 -m 20

I suspect you are missing the -m flag, and in that case test will fail as it launches
other primary processes (that test that is failing for you, for instance), which will require some free hugepages, 
so as you said, there is nothing to do with RTE_MAX_LCORE.

Btw, I also tested the fix on VMWare, and it works fine as well. Let me know if your problem is still different from what I think.
Thanks,

Pablo
> 
> Thanks
> --
> Thomas

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-04 12:40 [dpdk-dev] [PATCH] app/test: fix memory needs after RTE_MAX_LCORE was increased to 128 Pablo de Lara
2014-12-04 13:20 ` Thomas Monjalon
2014-12-05 15:57   ` De Lara Guarch, Pablo
2014-12-09 10:11 ` [dpdk-dev] [PATCH v2] " Pablo de Lara
2014-12-10 14:40   ` Thomas Monjalon
2014-12-11  1:11     ` Thomas Monjalon
2014-12-11  9:56       ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).