Re: [PATCH igt v2] tests/kms_cursor_legacy: Boost timing sensitive subtests to RT prio

Chris Wilson
2016-09-12T20:04:51Z

On Mon, Sep 12, 2016 at 05:47:57PM +0300, Imre Deak wrote:
> Even in an otherwise quiescent system there may be user/kernel threads
> independent of the test that add enough latency to make timing sensitive
> subtests fail. Boost the priority of such subtests to avoid these
> failures.
>
> This got rid of sporadic failures in basic-cursor-vs-flip-legacy and
> basic-cursor-vs-flip-varying-size with 'missed 1 frame' error message
> APL and BSW.
>
> v2:
> - Boost the priority in flip_vs_cursor_crc() too.
>
> CC: Chris Wilson <chris@chris-wilson.co.uk>
> CC: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

But we shouldn't need to. The basic test is:

align to vblank
request non-blocking flip
update cursor
check vblank hasn't advanced

We are not doing any busy loops here and there should be nothing else
running on the system. So what caused the context switch? Who are we
fighting against? If the only thing that is causing the issue is the
kernel thread used for the mmioflip (which won't be scheduled for
another 16ms until the next vblank), we have another bug to track down.

Imo, this patch is just papering over an issue that as it stands will be
present in real userspace (i.e. causing jerkiness in X, weston, cros
etc).
-Chris

--
Chris Wilson, Intel Open Source Technology Centre