From 30201d9fcd2af273733e37ad6514eaf65355b2cc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 19 Jun 2018 14:49:55 +0100 Subject: lib: Spin fast, retire early When using the pollable spinner, we often want to use it as a means of ensuring the task is running on the GPU before switching to something else. In which case we don't want to add extra delay inside the spinner, but the current 1000 NOPs add on order of 5us, which is often larger than the target latency. v2: Don't change perf_pmu as that is sensitive to the extra CPU latency from a tight GPU spinner. Signed-off-by: Chris Wilson Reviewed-by: Antonio Argenziano #v1 Reviewed-by: Joonas Lahtinen #v1 Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- tests/gem_eio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/gem_eio.c') diff --git a/tests/gem_eio.c b/tests/gem_eio.c index 0ec1aaec..3162a317 100644 --- a/tests/gem_eio.c +++ b/tests/gem_eio.c @@ -160,6 +160,7 @@ static igt_spin_t * __spin_poll(int fd, uint32_t ctx, unsigned long flags) struct igt_spin_factory opts = { .ctx = ctx, .engine = flags, + .flags = IGT_SPIN_FAST, }; if (gem_can_store_dword(fd, opts.engine)) -- cgit v1.2.3