diff mbox

drm/i915: Bump priority of clean up work

Message ID 20180712115729.3506-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 12, 2018, 11:57 a.m. UTC
We require that we keep the list of outstanding work short so that we do
not "leak" memory while pageflipping under stress. However that system
stress may delay kernel workers virtually indefinitely, which incurs the
pageflips stall and eventually hit a timeout waiting for the cleanup.

Try to combat CPU starvation of our short-lived cleanup workers by
switching to a high priority workqueue.

Testcase: igt/kms_cursor_legacy/all-pipes-torture-move
References: https://bugs.freedesktop.org/show_bug.cgi?id=107122
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
Not sure if highpri is enough to combat our RT torture...
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson Aug. 11, 2018, 10:53 a.m. UTC | #1
Quoting Patchwork (2018-08-11 11:51:15)
>     igt@kms_cursor_legacy@all-pipes-torture-move:
>       shard-snb:          DMESG-WARN (fdo#107122) -> PASS
>       shard-glk:          DMESG-WARN (fdo#107122) -> PASS
>       shard-apl:          DMESG-WARN (fdo#107122) -> PASS
>       shard-hsw:          DMESG-WARN (fdo#107122) -> PASS

They have been reasonably consistent failures for the last few runs, so
this looks like indication of success.
-Chris
Chris Wilson Aug. 13, 2018, 10:46 a.m. UTC | #2
Quoting Chris Wilson (2018-07-12 12:57:29)
> We require that we keep the list of outstanding work short so that we do
> not "leak" memory while pageflipping under stress. However that system
> stress may delay kernel workers virtually indefinitely, which incurs the
> pageflips stall and eventually hit a timeout waiting for the cleanup.
> 
> Try to combat CPU starvation of our short-lived cleanup workers by
> switching to a high priority workqueue.
> 
> Testcase: igt/kms_cursor_legacy/all-pipes-torture-move
> References: https://bugs.freedesktop.org/show_bug.cgi?id=107122
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> Not sure if highpri is enough to combat our RT torture...

CI thinks it is.
-Chris
Mika Kuoppala Aug. 13, 2018, 12:49 p.m. UTC | #3
Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Chris Wilson (2018-07-12 12:57:29)
>> We require that we keep the list of outstanding work short so that we do
>> not "leak" memory while pageflipping under stress. However that system
>> stress may delay kernel workers virtually indefinitely, which incurs the
>> pageflips stall and eventually hit a timeout waiting for the cleanup.
>> 
>> Try to combat CPU starvation of our short-lived cleanup workers by
>> switching to a high priority workqueue.
>> 
>> Testcase: igt/kms_cursor_legacy/all-pipes-torture-move
>> References: https://bugs.freedesktop.org/show_bug.cgi?id=107122
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> ---
>> Not sure if highpri is enough to combat our RT torture...
>
> CI thinks it is.

Not so familiar with the atomic commit. But it makes
sense and now there is evidence supporting it.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson Aug. 13, 2018, 1 p.m. UTC | #4
Quoting Mika Kuoppala (2018-08-13 13:49:43)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > Quoting Chris Wilson (2018-07-12 12:57:29)
> >> We require that we keep the list of outstanding work short so that we do
> >> not "leak" memory while pageflipping under stress. However that system
> >> stress may delay kernel workers virtually indefinitely, which incurs the
> >> pageflips stall and eventually hit a timeout waiting for the cleanup.
> >> 
> >> Try to combat CPU starvation of our short-lived cleanup workers by
> >> switching to a high priority workqueue.
> >> 
> >> Testcase: igt/kms_cursor_legacy/all-pipes-torture-move
> >> References: https://bugs.freedesktop.org/show_bug.cgi?id=107122
> >> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> >> ---
> >> Not sure if highpri is enough to combat our RT torture...
> >
> > CI thinks it is.
> 
> Not so familiar with the atomic commit. But it makes
> sense and now there is evidence supporting it.

Proof is indeed in the pudding; the CI stress case is about the worst it
can be so, with any luck the starvation issue is prevented. Thanks,
pushed.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8a07de5ac740..626dea685b84 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12741,7 +12741,7 @@  static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	 * down.
 	 */
 	INIT_WORK(&state->commit_work, intel_atomic_cleanup_work);
-	schedule_work(&state->commit_work);
+	queue_work(system_highpri_wq, &state->commit_work);
 }
 
 static void intel_atomic_commit_work(struct work_struct *work)