All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 0/3] lmbench: three fixes
@ 2014-08-19  9:16 jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 1/3] lmbench: Fix "make html" graph failure jackie.huang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jackie.huang @ 2014-08-19  9:16 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

--
The following changes since commit 5f532a928c7df863a3f0d32db3918c8f7d227e2b:

  cyassl: add recipe (2014-08-15 17:07:45 +0200)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib jhuang0/r_lmbench_140818-3
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/r_lmbench_140818-3

Jackie Huang (3):
  lmbench: Fix "make html" graph failure
  lmbench: fix lmbench memory check failure
  lmbench: fix doc install failure

 .../fix-lmbench-memory-check-failure.patch         |  206 ++++++++++++++++++++
 .../lmbench_result_html_report.patch               |   61 ++++++
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb    |    8 +-
 3 files changed, 272 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch

-- 
1.7.9.5



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

* [meta-oe][PATCH 1/3] lmbench: Fix "make html" graph failure
  2014-08-19  9:16 [meta-oe][PATCH 0/3] lmbench: three fixes jackie.huang
@ 2014-08-19  9:16 ` jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 2/3] lmbench: fix lmbench memory check failure jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 3/3] lmbench: fix doc install failure jackie.huang
  2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2014-08-19  9:16 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

The html-list perl script cannot parse the first line of the result
files about the lmbench version.

Additional fixes are to make the result's html pages easier to understand.

Signed-off-by: Lin Yu <lin.yu@windriver.com>
Signed-off-by: Fupan Li <fupan.li@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 .../lmbench_result_html_report.patch               |   61 ++++++++++++++++++++
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb    |    5 +-
 2 files changed, 64 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch

diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch
new file mode 100644
index 0000000..cda2f0c
--- /dev/null
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/lmbench_result_html_report.patch
@@ -0,0 +1,61 @@
+lmbench: Fix "make html" graph failure
+
+The html-list perl script cannot parse the first line of the result
+files about the lmbench version.
+
+Additional fixes are to make the result's html pages easier to understand.
+
+Signed-off-by: Lin Yu <lin.yu@windriver.com>
+Signed-off-by: Fupan Li <fupan.li@windriver.com>
+
+Reworded patch description.
+
+Upstream-status: inappropriate [ configuration ]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff --git a/results/Makefile b/results/Makefile
+index 0935376..1ef9a15 100644
+--- a/results/Makefile
++++ b/results/Makefile
+@@ -186,6 +186,7 @@ paper:
+ # scratch makes you want a Ghz machine.
+ html: dirs
+ 	-make clean
++	make ps
+ 	#$(SCRIPTS)bghtml $(BG)
+ 	$(SCRIPTS)html-list $(LIST)
+ 	$(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
+diff --git a/scripts/html-list b/scripts/html-list
+index 9850461..6383115 100755
+--- a/scripts/html-list
++++ b/scripts/html-list
+@@ -14,7 +14,7 @@ open(H, ">HTML/specific.html");
+ print H <<EOF;
+ <title>LMBENCH System Results</title>
+ <h1>LMBENCH System Results</h1>
+-<h2><a href=summary>Summary of results</a></h2>
++<h2><a href=summary.out>Summary of results</a></h2>
+ <hr>
+ EOF
+
+@@ -47,7 +47,7 @@ foreach $os (@os) {
+ 		open(F, $file);
+ 		$_ = <F>;
+ 		close(F);
+-		next unless /lmbench1.[01]/;
++		next unless /lmbench[0-9]+.[01]/;
+ 		chop;
+ 		$title = $_;
+ 		#s/.lmbench1.? results for //;
+@@ -103,10 +103,7 @@ EOF
+ 				    if $i < $#os;
+ 				print S<<EOF;
+ <h4>$title</h4>
+-<a href=../$doc{$what}>Information on this benchmark</a> (Not up to date)
+ <p><IMG SRC="${what}${scale}$N.gif">\n<p>
+-<a href=../lmbench.html>
+-<img align=middle src="../gifs/arrows/b_arrow.gif">LMBENCH table of contents</a>
+ <a href=specific.html>
+ <img align=middle src=\"../gifs/graph.gif\">System results table of contents</a>
+ <p>
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index 41db150..d8238ae 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -14,8 +14,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
            file://rename-line-binary.patch \
            file://update-results-script.patch \
            file://obey-ranlib.patch \
-           file://update-config-script.patch \ 
-           file://use-base_libdir-instead-of-hardcoded-lib.patch \ 
+           file://update-config-script.patch \
+           file://use-base_libdir-instead-of-hardcoded-lib.patch \
+           file://lmbench_result_html_report.patch \
 "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
-- 
1.7.9.5



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

* [meta-oe][PATCH 2/3] lmbench: fix lmbench memory check failure
  2014-08-19  9:16 [meta-oe][PATCH 0/3] lmbench: three fixes jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 1/3] lmbench: Fix "make html" graph failure jackie.huang
@ 2014-08-19  9:16 ` jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 3/3] lmbench: fix doc install failure jackie.huang
  2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2014-08-19  9:16 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

lmbench can't proceed on some targets.  The memory check fails because the
memory latency of each page is longer then 10us, which is a time limit set
in the original memsize.c.

The memory latency is very different on different targets due to the
hardware and current system load.  The targets with slower memory
chips or heavy system load need much longer time to read or write
the memory.

This fix changes the fixed time limit of 10us to a specific value calculated
from the runtime target.

Also set an upper limit of memory size used for lmbench testing.  The memory
check sometimes fails if the target has a large amount of memory, for
example more than 4G.

Signed-off-by: Qingming Su <qingming.su@windriver.com>
Signed-off-by: Fupan Li <fupan.li@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 .../fix-lmbench-memory-check-failure.patch         |  206 ++++++++++++++++++++
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb    |    1 +
 2 files changed, 207 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch

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
new file mode 100644
index 0000000..549a114
--- /dev/null
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/fix-lmbench-memory-check-failure.patch
@@ -0,0 +1,206 @@
+lmbench: Can't proceed on some targets
+
+lmbench can't proceed on some targets.  The memory check fails because the
+memory latency of each page is longer then 10us, which is a time limit set
+in the original memsize.c.
+
+The memory latency is very different on different targets due to the
+hardware and current system load.  The targets with slower memory
+chips or heavy system load need much longer time to read or write
+the memory.
+
+This fix changes the fixed time limit of 10us to a specific value calculated
+from the runtime target.
+
+Also set an upper limit of memory size used for lmbench testing.  The memory
+check sometimes fails if the target has a large amount of memory, for
+example more than 4G.
+
+Signed-off-by: Qingming Su <qingming.su@windriver.com>
+Signed-off-by: Fupan Li <fupan.li@windriver.com>
+
+Add and reword above comments
+
+Upstream-status: inappropriate [ configuration ]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff --git a/scripts/config-run b/scripts/config-run
+index e1f7b6d..31b9256 100755
+--- a/scripts/config-run
++++ b/scripts/config-run
+@@ -214,6 +214,12 @@ The bigger the range, the more accurate the results, but larger sizes
+ take somewhat longer to run the benchmark.
+
+ EOF
++
++# By default, use 512M memory as the upper limit for lmbench test
++if [ $MB -gt 512 ];then
++MB=512
++fi
++
+ echo $ECHON "MB [default $MB]: $ECHOC"
+ #read TMP
+ TMP=""
+@@ -718,10 +724,10 @@ case $MAIL in
+		;;
+ esac
+
+-INFO=`../scripts/info`
++INFO=`../scripts/hostinfo`
+ if [ $MAIL = yes ]
+ then	if [ ! -f $INFO ]
+-	then	cp ../scripts/info-template $INFO
++	then	cp ../scripts/hostinfo-template $INFO
+ 		chmod +w $INFO
+ 		REUSE=no
+ 	else
+@@ -765,7 +771,7 @@ EOF
+ 		then	EDITOR=$TMP
+ 		fi
+ 		if [ X$EDITOR != "none" ]
+-		then	$EDITOR `../scripts/info`
++		then	$EDITOR `../scripts/hostinfo`
+ 		fi
+ 	fi
+ fi
+diff --git a/src/Makefile b/src/Makefile
+index d1f0dc6..5098998 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -49,7 +49,7 @@ TARGET=`../scripts/target`
+ BINDIR=../bin/$(OS)
+ CONFIG=../bin/$(OS)/`../scripts/config`
+ UTILS=../scripts/target ../scripts/os ../scripts/gnu-os ../scripts/compiler \
+-	../scripts/info ../scripts/info-template ../scripts/version \
++	../scripts/hostinfo ../scripts/hostinfo-template ../scripts/version \
+ 	../scripts/config ../scripts/config-run ../scripts/results \
+ 	../scripts/lmbench ../scripts/make ../scripts/build
+ INSTALL=cp
+@@ -240,7 +240,7 @@ $O/getopt.o : getopt.c $(INCS)
+ 	$(COMPILE) -c getopt.c -o $O/getopt.o
+
+ $(UTILS) :
+-	-cd ../scripts; make get
++	-cd ../scripts; cp info hostinfo; cp info-template hostinfo-template
+
+ # Do not remove the next line, $(MAKE) depend needs it
+ # MAKEDEPEND follows
+diff --git a/src/memsize.c b/src/memsize.c
+index eb25a09..cf9fe0c 100644
+--- a/src/memsize.c
++++ b/src/memsize.c
+@@ -14,9 +14,12 @@ char	*id = "$Id$\n";
+
+ #define	CHK(x)	if ((x) == -1) { perror("x"); exit(1); }
+
+-#ifndef	TOO_LONG
+-#define	TOO_LONG	10	/* usecs */
+-#endif
++//#ifndef	TOO_LONG
++//#define	TOO_LONG	10	/* usecs */
++//#endif
++
++#define	MEMORY_SIZE_1MB (1024 * 1024)
++#define	MEMORY_SIZE_8MB (8 * 1024 * 1024)
+
+ int	alarm_triggered = 0;
+
+@@ -35,10 +38,10 @@ main(int ac, char **av)
+ 	size_t	delta;
+
+ 	if (ac == 2) {
+-		max = size = bytes(av[1]) * 1024 * 1024;
++		max = size = bytes(av[1]) * MEMORY_SIZE_1MB;
+ 	}
+-	if (max < 1024 * 1024) {
+-		max = size = 1024 * 1024 * 1024;
++	if (max < MEMORY_SIZE_1MB) {
++		max = size = 1024 * MEMORY_SIZE_1MB;
+ 	}
+ 	/*
+ 	 * Binary search down and then binary search up
+@@ -48,7 +51,7 @@ main(int ac, char **av)
+ 	}
+ 	/* delta = size / (2 * 1024 * 1024) */
+ 	for (delta = (size >> 21); delta > 0; delta >>= 1) {
+-		uint64 sz = (uint64)size + (uint64)delta * 1024 * 1024;
++		uint64 sz = (uint64)size + (uint64)delta * MEMORY_SIZE_1MB;
+ 		size_t check = sz;
+ 		if (max < sz) continue;
+ 		if (check < sz || !test_malloc(sz)) break;
+@@ -66,41 +69,58 @@ timeit(char *where, size_t size)
+ {
+ 	int	sum = 0;
+ 	size_t	n;
+-	size_t	s_prev;
++	size_t	s_prev = MEMORY_SIZE_8MB;
+ 	size_t	range;
+-	size_t	incr = 1024 * 1024;
++	size_t	incr = MEMORY_SIZE_1MB;
+ 	size_t	pagesize = getpagesize();
+-	unsigned long long	s;
+-
+-	if (size < 1024*1024 - 16*1024) {
+-		fprintf(stderr, "Bad size\n");
+-		return;
+-	}
++	size_t	time_each_page = 0;
++	size_t	too_long = 0;
++	unsigned long long      s;
++
++	if (pagesize < MEMORY_SIZE_1MB)
++		range = MEMORY_SIZE_1MB;
++	else
++		range = MEMORY_SIZE_8MB;
++
++	incr = MEMORY_SIZE_1MB;
++	
++	if (size < range) {
++              fprintf(stderr, "Bad size\n");
++              return;
++	    }
++
++	//Touch range of memory, get the average time (usec) of operating each memory page on this system
++        start(0);
++        touchRange(where, range, pagesize);
++        sum = stop(0, 0);
++
++        if ((time_each_page = sum * pagesize / range) < 1)
++		time_each_page = 1;
++	//Set the uper limit of time spending on one page
++        too_long = 10 * time_each_page;
+
+-	range = 1024 * 1024;
+-	incr = 1024 * 1024;
+-	touchRange(where, range, pagesize);
+ 	for (range += incr; range <= size; range += incr) {
+ 		n = range / pagesize;
+-		set_alarm(n * TOO_LONG);
++		set_alarm(n * too_long);
+ 		touchRange(where + range - incr, incr, pagesize);
+ 		clear_alarm();
+-		set_alarm(n * TOO_LONG);
++		set_alarm(n * too_long);
+ 		start(0);
+ 		touchRange(where, range, pagesize);
+ 		sum = stop(0, 0);
+ 		clear_alarm();
+-		if ((sum / n) > TOO_LONG || alarm_triggered) {
++		if ((sum / n) > too_long || alarm_triggered) {
+ 			size = range - incr;
++			fprintf(stderr, "Error! Memory testing timeout! Touch one page of memory needs more than %d (usecs)\n ", too_long);
+ 			break;
+ 		}
+-		for (s = 8 * 1024 * 1024; s <= range; s_prev = s, s *= 2)
++		for (s = s_prev; s <= range; s_prev = s, s *= 2)
+ 			if (s < s_prev) break;
+ 		incr = s / 8;
+ 		if (range < size && size < range + incr) {
+ 			incr = size - range;
+ 		}
+-		fprintf(stderr, "%dMB OK\r", (int)(range/(1024*1024)));
++		fprintf(stderr, "%dMB OK\r", (int)(range/MEMORY_SIZE_1MB));
+ 	}
+ 	fprintf(stderr, "\n");
+ 	printf("%d\n", (int)(size>>20));
diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index d8238ae..c5d6ac8 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -17,6 +17,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
            file://update-config-script.patch \
            file://use-base_libdir-instead-of-hardcoded-lib.patch \
            file://lmbench_result_html_report.patch \
+           file://fix-lmbench-memory-check-failure.patch \
 "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
--
1.7.9.5



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

* [meta-oe][PATCH 3/3] lmbench: fix doc install failure
  2014-08-19  9:16 [meta-oe][PATCH 0/3] lmbench: three fixes jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 1/3] lmbench: Fix "make html" graph failure jackie.huang
  2014-08-19  9:16 ` [meta-oe][PATCH 2/3] lmbench: fix lmbench memory check failure jackie.huang
@ 2014-08-19  9:16 ` jackie.huang
  2 siblings, 0 replies; 4+ messages in thread
From: jackie.huang @ 2014-08-19  9:16 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

Fix the failure:
cp: cannot create regular file `/usr/share/man/man1/bargraph.1': Permission denied
mkdir: cannot create directory `/usr/share/man/man9': Permission denied

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb    |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
index c5d6ac8..67392b4 100644
--- a/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
+++ b/meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb
@@ -52,7 +52,7 @@ do_install () {
               > ${D}${sysconfdir}/tmpfiles.d/lmbench.conf
     fi
 
-    oe_runmake 'BASE=${D}${prefix}' \
+    oe_runmake BASE="${D}${prefix}" MANDIR="${D}${mandir}" \
             -C src install
     mv ${D}${bindir}/line ${D}${bindir}/lm_line
     install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/
-- 
1.7.9.5



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

end of thread, other threads:[~2014-08-19  9:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19  9:16 [meta-oe][PATCH 0/3] lmbench: three fixes jackie.huang
2014-08-19  9:16 ` [meta-oe][PATCH 1/3] lmbench: Fix "make html" graph failure jackie.huang
2014-08-19  9:16 ` [meta-oe][PATCH 2/3] lmbench: fix lmbench memory check failure jackie.huang
2014-08-19  9:16 ` [meta-oe][PATCH 3/3] lmbench: fix doc install failure jackie.huang

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.