* [PATCH] tests/gem_exec_lut_handle
@ 2015-03-18 10:19 Daniel Vetter
2015-03-18 11:19 ` Chris Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2015-03-18 10:19 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter
Reduce default number of repeats a lot. High repeat count is only
useful for microbenchmarking, not that much for regression testing.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
tests/gem_exec_lut_handle.c | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/tests/gem_exec_lut_handle.c b/tests/gem_exec_lut_handle.c
index c2d490f94cd6..e2e31f233cd5 100644
--- a/tests/gem_exec_lut_handle.c
+++ b/tests/gem_exec_lut_handle.c
@@ -113,9 +113,32 @@ static int exec(int fd, int num_exec, int num_relocs, unsigned flags)
&execbuf);
}
+int repeats = 10;
+
+static int opt_handler(int opt, int opt_index)
+{
+ switch (opt) {
+ case 'r':
+ igt_warn("meh\n");
+ repeats = atoi(optarg);
+ igt_warn("meh\n");
+ break;
+ default:
+ igt_assert(0);
+ }
+
+ return 0;
+}
+
#define ELAPSED(a,b) (1e6*((b)->tv_sec - (a)->tv_sec) + ((b)->tv_usec - (a)->tv_usec))
-igt_simple_main
+int main(int argc, char **argv)
{
+ const char *help_str =
+ " --repeats\t\tNumber of repeats to run the microbenchmarks for.";
+ static struct option long_options[] = {
+ {"repeats", 1, 0, 'r'},
+ { 0, 0, 0, 0 }
+ };
uint32_t batch[2] = {MI_BATCH_BUFFER_END};
int fd, n, m, count;
const struct {
@@ -128,6 +151,9 @@ igt_simple_main
{ .name = NULL },
}, *p;
+ igt_simple_init_parse_opts(&argc, argv, "", long_options,
+ help_str, opt_handler);
+
igt_skip_on_simulation();
fd = drm_open_any();
@@ -160,7 +186,7 @@ igt_simple_main
do_or_die(exec(fd, n, m, 0 | p->flags));
gettimeofday(&start, NULL);
- for (count = 0; count < 1000; count++)
+ for (count = 0; count < repeats; count++)
do_or_die(exec(fd, n, m, 0 | p->flags));
gettimeofday(&end, NULL);
gem_sync(fd, gem_exec[MAX_NUM_EXEC].handle);
@@ -168,7 +194,7 @@ igt_simple_main
do_or_die(exec(fd, n, m, USE_LUT | p->flags));
gettimeofday(&start, NULL);
- for (count = 0; count < 1000; count++)
+ for (count = 0; count < repeats; count++)
do_or_die(exec(fd, n, m, USE_LUT | p->flags));
gettimeofday(&end, NULL);
gem_sync(fd, gem_exec[MAX_NUM_EXEC].handle);
@@ -204,4 +230,10 @@ igt_simple_main
igt_info("\n");
}
}
+
+ igt_info("Used %i rounds for testing.\n"
+ "Increase for more accurate results when microbenchmarking with --repeats\n",
+ repeats);
+
+ igt_exit();
}
--
1.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/gem_exec_lut_handle
2015-03-18 10:19 [PATCH] tests/gem_exec_lut_handle Daniel Vetter
@ 2015-03-18 11:19 ` Chris Wilson
2015-03-18 13:50 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2015-03-18 11:19 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development
On Wed, Mar 18, 2015 at 11:19:32AM +0100, Daniel Vetter wrote:
> Reduce default number of repeats a lot. High repeat count is only
> useful for microbenchmarking, not that much for regression testing.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131
This just to hide the regression that exec got a lot slower?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/gem_exec_lut_handle
2015-03-18 11:19 ` Chris Wilson
@ 2015-03-18 13:50 ` Daniel Vetter
2015-03-18 14:53 ` Chris Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2015-03-18 13:50 UTC (permalink / raw)
To: Chris Wilson, Daniel Vetter, Intel Graphics Development, Daniel Vetter
On Wed, Mar 18, 2015 at 11:19:46AM +0000, Chris Wilson wrote:
> On Wed, Mar 18, 2015 at 11:19:32AM +0100, Daniel Vetter wrote:
> > Reduce default number of repeats a lot. High repeat count is only
> > useful for microbenchmarking, not that much for regression testing.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131
>
> This just to hide the regression that exec got a lot slower?
Well 10% or so afaik. But in general I think we need to grow more smarts
so that microbenchmarks don't chew too much cpu time. Eventually I'd like
to integrate them somehow in our performance testing in a new igt mode or
something like that ...
And I haven't seen a lot of activity to track down the reloc regression
itself.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/gem_exec_lut_handle
2015-03-18 13:50 ` Daniel Vetter
@ 2015-03-18 14:53 ` Chris Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2015-03-18 14:53 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter
On Wed, Mar 18, 2015 at 02:50:43PM +0100, Daniel Vetter wrote:
> And I haven't seen a lot of activity to track down the reloc regression
> itself.
The cause was obvious. The essence is the multiple redundant atomic
operations added to execbuffer.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-18 14:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 10:19 [PATCH] tests/gem_exec_lut_handle Daniel Vetter
2015-03-18 11:19 ` Chris Wilson
2015-03-18 13:50 ` Daniel Vetter
2015-03-18 14:53 ` Chris Wilson
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.