All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@6wind.com>
To: dev@dpdk.org
Subject: [PATCH] app/test: fix default memory assignment
Date: Mon,  1 Jun 2015 14:11:00 +0200	[thread overview]
Message-ID: <1433160660-20773-1-git-send-email-david.marchand@6wind.com> (raw)

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

             reply	other threads:[~2015-06-01 12:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 12:11 David Marchand [this message]
2015-06-15 13:06 ` [PATCH] app/test: fix default memory assignment Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433160660-20773-1-git-send-email-david.marchand@6wind.com \
    --to=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.