* [Qemu-devel] [PATCH] Fix /perf/nesting coroutine benchmark
@ 2013-09-17 16:26 Gabriel Kerneis
2013-09-19 11:21 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Kerneis @ 2013-09-17 16:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Gabriel Kerneis
The /perf/nesting benchmark is broken because the counters are
not reset after each iteration. Therefore, nesting is done only
on the first iteration, and skipped on every other.
This patch fixes the issue, and reduces the number of iterations
to make it possible to run the benchmark in a reasonable amount of
time.
Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>
---
tests/test-coroutine.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c
index f4f90ac..668d88f 100644
--- a/tests/test-coroutine.c
+++ b/tests/test-coroutine.c
@@ -182,17 +182,17 @@ static void perf_nesting(void)
unsigned int i, maxcycles, maxnesting;
double duration;
- maxcycles = 100000000;
+ maxcycles = 10000;
maxnesting = 1000;
Coroutine *root;
- NestData nd = {
- .n_enter = 0,
- .n_return = 0,
- .max = maxnesting,
- };
g_test_timer_start();
for (i = 0; i < maxcycles; i++) {
+ NestData nd = {
+ .n_enter = 0,
+ .n_return = 0,
+ .max = maxnesting,
+ };
root = qemu_coroutine_create(nest);
qemu_coroutine_enter(root, &nd);
}
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix /perf/nesting coroutine benchmark
2013-09-17 16:26 [Qemu-devel] [PATCH] Fix /perf/nesting coroutine benchmark Gabriel Kerneis
@ 2013-09-19 11:21 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-09-19 11:21 UTC (permalink / raw)
To: Gabriel Kerneis; +Cc: qemu-devel
On Tue, Sep 17, 2013 at 06:26:48PM +0200, Gabriel Kerneis wrote:
> The /perf/nesting benchmark is broken because the counters are
> not reset after each iteration. Therefore, nesting is done only
> on the first iteration, and skipped on every other.
>
> This patch fixes the issue, and reduces the number of iterations
> to make it possible to run the benchmark in a reasonable amount of
> time.
>
> Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info>
> ---
> tests/test-coroutine.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-19 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 16:26 [Qemu-devel] [PATCH] Fix /perf/nesting coroutine benchmark Gabriel Kerneis
2013-09-19 11:21 ` Stefan Hajnoczi
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).