Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/breadcrumbs: Reduce missed-breadcrumb false positive rate

Change the on-cpu check to on-runqueue to catch if the waiter has been
woken (and reset its current_state back to TASK_UNINTERRUPTIBLE to
perform the seqno check) but is sleeping due to being preempted off the
cpu.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-1-chris@chris-wilson.co.uk

+1 -5
+1 -5
drivers/gpu/drm/i915/intel_breadcrumbs.c
··· 27 27 28 28 #include "i915_drv.h" 29 29 30 - #ifdef CONFIG_SMP 31 - #define task_asleep(tsk) ((tsk)->state & TASK_NORMAL && !(tsk)->on_cpu) 32 - #else 33 - #define task_asleep(tsk) ((tsk)->state & TASK_NORMAL) 34 - #endif 30 + #define task_asleep(tsk) ((tsk)->state & TASK_NORMAL && !(tsk)->on_rq) 35 31 36 32 static unsigned int __intel_breadcrumbs_wakeup(struct intel_breadcrumbs *b) 37 33 {