Re: [Intel-gfx] [PATCH v2] prime_mmap_coherency: Add return error tests for prime sync ioctl

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

 



On Fri, Mar 18, 2016 at 09:44:40AM +0000, Chris Wilson wrote:
> On Thu, Mar 17, 2016 at 06:18:06PM -0300, Tiago Vignatti wrote:
> > +static void test_ioctl_errors(void)
> > +{
> > +	int i;
> > +	int num_children = 8*sysconf(_SC_NPROCESSORS_ONLN);
> > +
> > +	igt_fork_signal_helper();
> > +	igt_fork(child, num_children) {
> 
> Actually there is a danger here in only using a fork-bomb, we may loose
> out on signal interruptions due to busyspins on the mutex (i.e. the
> contention hiding critical paths, since we crucially rely on timing).
> 
> For fun, I would use:
> 
> int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
> int num_children;
> 
> igt_fork_signal_helper();
> for (int num_children = 1; num_children <= 8 *ncpus; num_children <<= 1) {
> 	igt_fork(child, num_children) {
> 		struct timespec start = {};
> 		while (igt_seconds_elapsed(&start) <= num_children)
> 			blit_and_cmp();
> 	}
> }
> igt_waitchildren();

With the bug ofc!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux