[PATCH v2] prime_mmap_coherency: Add return error tests for prime sync ioctl
Chris Wilson
chris at chris-wilson.co.uk
Fri Mar 18 09:44:40 UTC 2016
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();
igt_stop_signal_helper();
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list