diff options
Diffstat (limited to 'meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch')
-rw-r--r-- | meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch index 549a114d13..cbab5c424e 100644 --- a/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch +++ b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch | |||
@@ -1,4 +1,7 @@ | |||
1 | lmbench: Can't proceed on some targets | 1 | From 65180976c9963432d166b47a0b692260a69c0d47 Mon Sep 17 00:00:00 2001 |
2 | From: Qingming Su <qingming.su@windriver.com> | ||
3 | Date: Tue, 19 Aug 2014 05:16:17 -0400 | ||
4 | Subject: [PATCH] lmbench: Can't proceed on some targets | ||
2 | 5 | ||
3 | lmbench can't proceed on some targets. The memory check fails because the | 6 | lmbench can't proceed on some targets. The memory check fails because the |
4 | memory latency of each page is longer then 10us, which is a time limit set | 7 | memory latency of each page is longer then 10us, which is a time limit set |
@@ -25,13 +28,19 @@ Upstream-status: inappropriate [ configuration ] | |||
25 | 28 | ||
26 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | 29 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
27 | 30 | ||
31 | --- | ||
32 | scripts/config-run | 12 +++++++--- | ||
33 | src/Makefile | 4 ++-- | ||
34 | src/memsize.c | 66 +++++++++++++++++++++++++++++++++++------------------- | ||
35 | 3 files changed, 54 insertions(+), 28 deletions(-) | ||
36 | |||
28 | diff --git a/scripts/config-run b/scripts/config-run | 37 | diff --git a/scripts/config-run b/scripts/config-run |
29 | index e1f7b6d..31b9256 100755 | 38 | index 918cbdf..096ed12 100755 |
30 | --- a/scripts/config-run | 39 | --- a/scripts/config-run |
31 | +++ b/scripts/config-run | 40 | +++ b/scripts/config-run |
32 | @@ -214,6 +214,12 @@ The bigger the range, the more accurate the results, but larger sizes | 41 | @@ -197,6 +197,12 @@ The bigger the range, the more accurate the results, but larger sizes |
33 | take somewhat longer to run the benchmark. | 42 | take somewhat longer to run the benchmark. |
34 | 43 | ||
35 | EOF | 44 | EOF |
36 | + | 45 | + |
37 | +# By default, use 512M memory as the upper limit for lmbench test | 46 | +# By default, use 512M memory as the upper limit for lmbench test |
@@ -40,12 +49,12 @@ index e1f7b6d..31b9256 100755 | |||
40 | +fi | 49 | +fi |
41 | + | 50 | + |
42 | echo $ECHON "MB [default $MB]: $ECHOC" | 51 | echo $ECHON "MB [default $MB]: $ECHOC" |
43 | #read TMP | 52 | read TMP |
44 | TMP="" | 53 | if [ X$TMP != X ] |
45 | @@ -718,10 +724,10 @@ case $MAIL in | 54 | @@ -687,10 +693,10 @@ case $MAIL in |
46 | ;; | 55 | ;; |
47 | esac | 56 | esac |
48 | 57 | ||
49 | -INFO=`../scripts/info` | 58 | -INFO=`../scripts/info` |
50 | +INFO=`../scripts/hostinfo` | 59 | +INFO=`../scripts/hostinfo` |
51 | if [ $MAIL = yes ] | 60 | if [ $MAIL = yes ] |
@@ -54,8 +63,8 @@ index e1f7b6d..31b9256 100755 | |||
54 | + then cp ../scripts/hostinfo-template $INFO | 63 | + then cp ../scripts/hostinfo-template $INFO |
55 | chmod +w $INFO | 64 | chmod +w $INFO |
56 | REUSE=no | 65 | REUSE=no |
57 | else | 66 | else |
58 | @@ -765,7 +771,7 @@ EOF | 67 | @@ -733,7 +739,7 @@ EOF |
59 | then EDITOR=$TMP | 68 | then EDITOR=$TMP |
60 | fi | 69 | fi |
61 | if [ X$EDITOR != "none" ] | 70 | if [ X$EDITOR != "none" ] |
@@ -65,10 +74,10 @@ index e1f7b6d..31b9256 100755 | |||
65 | fi | 74 | fi |
66 | fi | 75 | fi |
67 | diff --git a/src/Makefile b/src/Makefile | 76 | diff --git a/src/Makefile b/src/Makefile |
68 | index d1f0dc6..5098998 100644 | 77 | index c7e4e3c..d9efd54 100644 |
69 | --- a/src/Makefile | 78 | --- a/src/Makefile |
70 | +++ b/src/Makefile | 79 | +++ b/src/Makefile |
71 | @@ -49,7 +49,7 @@ TARGET=`../scripts/target` | 80 | @@ -50,7 +50,7 @@ TARGET=`../scripts/target` |
72 | BINDIR=../bin/$(OS) | 81 | BINDIR=../bin/$(OS) |
73 | CONFIG=../bin/$(OS)/`../scripts/config` | 82 | CONFIG=../bin/$(OS)/`../scripts/config` |
74 | UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \ | 83 | UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \ |
@@ -79,21 +88,21 @@ index d1f0dc6..5098998 100644 | |||
79 | INSTALL=cp | 88 | INSTALL=cp |
80 | @@ -240,7 +240,7 @@ $O/getopt.o : getopt.c $(INCS) | 89 | @@ -240,7 +240,7 @@ $O/getopt.o : getopt.c $(INCS) |
81 | $(COMPILE) -c getopt.c -o $O/getopt.o | 90 | $(COMPILE) -c getopt.c -o $O/getopt.o |
82 | 91 | ||
83 | $(UTILS) : | 92 | $(UTILS) : |
84 | - -cd ../scripts; make get | 93 | - -cd ../scripts; make get |
85 | + -cd ../scripts; cp info hostinfo; cp info-template hostinfo-template | 94 | + -cd ../scripts; cp info hostinfo; cp info-template hostinfo-template |
86 | 95 | ||
87 | # Do not remove the next line, $(MAKE) depend needs it | 96 | # Do not remove the next line, $(MAKE) depend needs it |
88 | # MAKEDEPEND follows | 97 | # MAKEDEPEND follows |
89 | diff --git a/src/memsize.c b/src/memsize.c | 98 | diff --git a/src/memsize.c b/src/memsize.c |
90 | index eb25a09..cf9fe0c 100644 | 99 | index eb25a09..82d7faf 100644 |
91 | --- a/src/memsize.c | 100 | --- a/src/memsize.c |
92 | +++ b/src/memsize.c | 101 | +++ b/src/memsize.c |
93 | @@ -14,9 +14,12 @@ char *id = "$Id$\n"; | 102 | @@ -14,9 +14,12 @@ char *id = "$Id$\n"; |
94 | 103 | ||
95 | #define CHK(x) if ((x) == -1) { perror("x"); exit(1); } | 104 | #define CHK(x) if ((x) == -1) { perror("x"); exit(1); } |
96 | 105 | ||
97 | -#ifndef TOO_LONG | 106 | -#ifndef TOO_LONG |
98 | -#define TOO_LONG 10 /* usecs */ | 107 | -#define TOO_LONG 10 /* usecs */ |
99 | -#endif | 108 | -#endif |
@@ -103,12 +112,12 @@ index eb25a09..cf9fe0c 100644 | |||
103 | + | 112 | + |
104 | +#define MEMORY_SIZE_1MB (1024 * 1024) | 113 | +#define MEMORY_SIZE_1MB (1024 * 1024) |
105 | +#define MEMORY_SIZE_8MB (8 * 1024 * 1024) | 114 | +#define MEMORY_SIZE_8MB (8 * 1024 * 1024) |
106 | 115 | ||
107 | int alarm_triggered = 0; | 116 | int alarm_triggered = 0; |
108 | 117 | ||
109 | @@ -35,10 +38,10 @@ main(int ac, char **av) | 118 | @@ -35,10 +38,10 @@ main(int ac, char **av) |
110 | size_t delta; | 119 | size_t delta; |
111 | 120 | ||
112 | if (ac == 2) { | 121 | if (ac == 2) { |
113 | - max = size = bytes(av[1]) * 1024 * 1024; | 122 | - max = size = bytes(av[1]) * 1024 * 1024; |
114 | + max = size = bytes(av[1]) * MEMORY_SIZE_1MB; | 123 | + max = size = bytes(av[1]) * MEMORY_SIZE_1MB; |
@@ -170,7 +179,7 @@ index eb25a09..cf9fe0c 100644 | |||
170 | + time_each_page = 1; | 179 | + time_each_page = 1; |
171 | + //Set the uper limit of time spending on one page | 180 | + //Set the uper limit of time spending on one page |
172 | + too_long = 10 * time_each_page; | 181 | + too_long = 10 * time_each_page; |
173 | 182 | ||
174 | - range = 1024 * 1024; | 183 | - range = 1024 * 1024; |
175 | - incr = 1024 * 1024; | 184 | - incr = 1024 * 1024; |
176 | - touchRange(where, range, pagesize); | 185 | - touchRange(where, range, pagesize); |