DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test: fix default memory assignment
@ 2015-06-01 12:11 David Marchand
  2015-06-15 13:06 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2015-06-01 12:11 UTC (permalink / raw)
  To: dev

From: Gaetan Rivet <gaetan.rivet@6wind.com>

Each test requires a certain minimal amount of memory.
Spreading memory on all sockets means that the test will get less memory than
what it wanted on multi sockets system.
So replace all_sockets() with per_sockets().

Also doubled memory on group_5 as current requirement is not enough.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 app/test/autotest_data.py |   61 ++++++++++++++++++++++-----------------------
 1 file changed, 30 insertions(+), 31 deletions(-)

diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 618a946..0c3802b 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -43,11 +43,10 @@ def num_sockets():
 		return 1
 	return result
 
-# spread given number for all sockets
-# e.g. 32 becomes 16,16 or 8,8,8,8 etc.
-def all_sockets(num):
-	mem_per_socket = num / num_sockets()
-	return ",".join([str(mem_per_socket)] * num_sockets())
+# Assign given number to each socket
+# e.g. 32 becomes 32,32 or 32,32,32,32
+def per_sockets(num):
+    return ",".join([str(num)] * num_sockets())
 
 # groups of tests that can be run in parallel
 # the grouping has been found largely empirically
@@ -55,8 +54,8 @@ parallel_test_group_list = [
 
 {
 	"Prefix":	"group_1",
-	"Memory" :	all_sockets(8),
-	"Tests" :	
+	"Memory" :	per_sockets(8),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Timer autotest",
@@ -69,7 +68,7 @@ parallel_test_group_list = [
 		 "Command" : 	"debug_autotest",
 		 "Func" :	default_autotest,
 		 "Report" :	None,
-		},	
+		},
 		{
 		 "Name" :	"Errno autotest",
 		 "Command" : 	"errno_autotest",
@@ -87,7 +86,7 @@ parallel_test_group_list = [
 		 "Command" : 	"common_autotest",
 		 "Func" :	default_autotest,
 		 "Report" :	None,
-		},	
+		},
 		{
 		 "Name" :	"Dump log history",
 		 "Command" :	"dump_log_history",
@@ -111,7 +110,7 @@ parallel_test_group_list = [
 {
 	"Prefix":	"group_2",
 	"Memory" :	"32",
-	"Tests" :	
+	"Tests" :
 	[
 		{
 		 "Name" :	"Memory autotest",
@@ -165,8 +164,8 @@ parallel_test_group_list = [
 },
 {
 	"Prefix":	"group_3",
-	"Memory" :	all_sockets(1024),
-	"Tests" :	
+	"Memory" :	per_sockets(1024),
+	"Tests" :
 	[
 		{
 		 "Name" :	"LPM autotest",
@@ -208,8 +207,8 @@ parallel_test_group_list = [
 },
 {
 	"Prefix":	"group_4",
-	"Memory" :	all_sockets(128),
-	"Tests" :	
+	"Memory" :	per_sockets(128),
+	"Tests" :
 	[
 		{
 		 "Name" :	"PCI autotest",
@@ -251,8 +250,8 @@ parallel_test_group_list = [
 },
 {
 	"Prefix":	"group_5",
-	"Memory" :	"16",
-	"Tests" :	
+	"Memory" :	"32",
+	"Tests" :
 	[
 		{
 		 "Name" :	"Spinlock autotest",
@@ -288,8 +287,8 @@ parallel_test_group_list = [
 },
 {
 	"Prefix":	"group_6",
-	"Memory" :	all_sockets(620),
-	"Tests" :	
+	"Memory" :	per_sockets(620),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Function reentrancy autotest",
@@ -368,8 +367,8 @@ non_parallel_test_group_list = [
 },
 {
 	"Prefix":	"mempool_perf",
-	"Memory" :	all_sockets(256),
-	"Tests" :	
+	"Memory" :	per_sockets(256),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Cycles autotest",
@@ -387,8 +386,8 @@ non_parallel_test_group_list = [
 },
 {
 	"Prefix":	"memcpy_perf",
-	"Memory" :	all_sockets(512),
-	"Tests" :	
+	"Memory" :	per_sockets(512),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Memcpy performance autotest",
@@ -400,8 +399,8 @@ non_parallel_test_group_list = [
 },
 {
 	"Prefix":	"hash_perf",
-	"Memory" :	all_sockets(512),
-	"Tests" :	
+	"Memory" :	per_sockets(512),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Hash performance autotest",
@@ -413,7 +412,7 @@ non_parallel_test_group_list = [
 },
 {
 	"Prefix" :      "power",
-	"Memory" :      all_sockets(512),
+	"Memory" :      per_sockets(512),
 	"Tests" :
 	[
 		{
@@ -426,7 +425,7 @@ non_parallel_test_group_list = [
 },
 {
 	"Prefix" :      "power_acpi_cpufreq",
-	"Memory" :      all_sockets(512),
+	"Memory" :      per_sockets(512),
 	"Tests" :
 	[
 		{
@@ -465,8 +464,8 @@ non_parallel_test_group_list = [
 },
 {
 	"Prefix":	"timer_perf",
-	"Memory" :	all_sockets(512),
-	"Tests" :	
+	"Memory" :	per_sockets(512),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Timer performance autotest",
@@ -476,14 +475,14 @@ non_parallel_test_group_list = [
 		},
 	]
 },
-							
+
 #
 # Please always make sure that ring_perf is the last test!
 #
 {
 	"Prefix":	"ring_perf",
-	"Memory" :	all_sockets(512),
-	"Tests" :	
+	"Memory" :	per_sockets(512),
+	"Tests" :
 	[
 		{
 		 "Name" :	"Ring performance autotest",
-- 
1.7.10.4

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

end of thread, other threads:[~2015-06-15 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 12:11 [dpdk-dev] [PATCH] app/test: fix default memory assignment David Marchand
2015-06-15 13:06 ` Thomas Monjalon

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