Re: [PATCH i-g-t] tests/gem_exec_nop: Improved test run time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 04, 2015 at 01:40:45PM +0000, Morton, Derek J wrote:
> >
> >
> >-----Original Message-----
> >From: Chris Wilson [mailto:chris@xxxxxxxxxxxxxxxxxx] 
> >Sent: Tuesday, November 3, 2015 4:40 PM
> >To: Morton, Derek J
> >Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Wood, Thomas; Gore, Tim
> >Subject: Re: [PATCH i-g-t] tests/gem_exec_nop: Improved test run time
> >
> >On Tue, Nov 03, 2015 at 04:29:45PM +0000, Derek Morton wrote:
> >> Reduced the Sleep period to 200mS and reduced the repetition count to 
> >> 7 to decrease the test run time significantly.
> >> 
> >> Also fixed a non ascii character that messed up the results table formatting.
> >
> >Pardon? Are you working around someone else's bug?
> 
> > 
> >> Signed-off-by: Derek Morton <derek.j.morton@xxxxxxxxx>
> >> ---
> >>  tests/gem_exec_nop.c | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >> 
> >> diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c index 
> >> a287d08..5028145 100644
> >> --- a/tests/gem_exec_nop.c
> >> +++ b/tests/gem_exec_nop.c
> >> @@ -133,7 +133,7 @@ static void loop(int fd, uint32_t handle, unsigned ring_id, const char *ring_nam
> >>  	gem_sync(fd, handle);
> >>  
> >>  	for (count = 1; count <= SLOW_QUICK(1<<17, 1<<4); count <<= 1) {
> >> -		const int reps = 13;
> >> +		const int reps = 7;
> >>  		igt_stats_t stats;
> >>  		int n;
> >>  
> >> @@ -142,7 +142,7 @@ static void loop(int fd, uint32_t handle, unsigned ring_id, const char *ring_nam
> >>  		for (n = 0; n < reps; n++) {
> >>  			struct timespec start, end;
> >>  			int loops = count;
> >> -			sleep(1); /* wait for the hw to go back to sleep */
> >> +			usleep(200000); /* wait 200mS for the hw to go back to sleep */
> >>  			clock_gettime(CLOCK_MONOTONIC, &start);
> >>  			while (loops--)
> >>  				do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); @@ -151,7 
> >> +151,7 @@ static void loop(int fd, uint32_t handle, unsigned ring_id, const char *ring_nam
> >>  			igt_stats_push(&stats, elapsed(&start, &end, count));
> >>  		}
> >>  
> >> -		igt_info("Time to exec x %d:		%7.3fµs (ring=%s)\n",
> >> +		igt_info("Time to exec x %d:		%7.3fuS (ring=%s)\n",
> >
> >Did SI change the standard unit of measurement for time?
> 
> Before my patch the test output looks like:

GT-Version: 1.11-g0aa00ef (x86_64) (Linux: 4.2.0-rc6+ x86_64)
Time to exec x 1:		120.438µs (ring=render)
Time to exec x 2:		 72.689µs (ring=render)
...

> So the 'µ' character is causing problems.
> 
> I have done some more investigations and have found a change you made to igt_core.c in June to be the cause.
> You added:
> 	if (isatty(STDOUT_FILENO))
> 		setlocale(LC_ALL, "");
> to common_init()
> 
> I added some debug and the setlocale() on android is returning 'C' so is forcing standard ascii to be used. As 'µ' is not an ascii character it causes problems.

That's not the meaning of setlocale().
 
> So I think if you want to continue allow setting a locale to a lowest common denominator (ascii) then all the text printed by tests also needs to conform to ascii and this change is valid.

No, just android appears to be broken. I was actually complaining about
the use of 'S'.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux