drm/i915/execlists: Don't trigger preemption if complete
Subsystems (2)
PATCH 1/1 drm/i915/execlists: Don't trigger preemption if complete
Due to the latency of the tasklet running from ksoftirqd, by the time we process the execlist dequeue may be a long time behind the GPU. If the request was completed when we ran reschedule, we will not have tweaked its priority, but if it is still listed as being in-flight for dequeue we will use it as a reference for the rest of the queue, including requests from its own context which will now be at higher priority. This can cause us to issue a preempt-to-idle request, even though the request we want to preempt is already complete.
--- drivers/gpu/drm/i915/intel_lrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_lrc.c +2 -1
@@ -610,7 +610,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine)if (!execlists_is_active (execlists,EXECLISTS_ACTIVE_HWACK )) goto unlock; -if (need_preempt (engine, last, execlists->queue_priority)) { +if (need_preempt (engine, last, execlists->queue_priority) && + !i915_request_completed (last)) {inject_preempt_context (engine); goto unlock; }
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/execlists: Don't trigger preemption if complete
== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Don't trigger preemption if complete
URL : https://patchwork.freedesktop.org/series/42515/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4116 -> Patchwork_8856 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42515/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_8856 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_mmap_gtt@basic-small-bo-tiledx:
fi-gdg-551: PASS -> FAIL (fdo#102575)
==== Possible fixes ====
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-ivb-3520m: DMESG-WARN (fdo#106084) -> PASS
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
== Participating hosts (38 -> 35) ==
Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4116 -> Patchwork_8856
CI_DRM_4116: 7ff375cb94000d93f7a9d541cb0c8180fbea80f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4453: 29ae12bd764e3b1876356e7628a32192b4ec9066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8856: 8eeceef247da5f6855bd89b0ab8caaa18a6ddbeb @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4453: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit
== Linux commits ==
8eeceef247da drm/i915/execlists: Don't trigger preemption if complete
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8856/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915/execlists: Don't trigger preemption if complete
In reply to Chris WilsonDue to the latency of the tasklet running from ksoftirqd, by the time we process the execlist dequeue may be a long time behind the GPU. If the request was completed when we ran reschedule, we will not have tweaked its priority, but if it is still listed as being in-flight for dequeue we will use it as a reference for the rest of the queue, including requests from its own context which will now be at higher priority. This can cause us to issue a preempt-to-idle request, even though the request we want to preempt is already complete.
--- drivers/gpu/drm/i915/intel_lrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_lrc.c +2 -1
@@ -185,7 +185,8 @@ static inline bool need_preempt(const struct intel_engine_cs *engine, int prio) {return (intel_engine_has_preemption (engine) && -__execlists_need_preempt (prio,rq_prio (last))); +__execlists_need_preempt (prio,rq_prio (last)) && + !i915_request_completed (last)); }/**
Signature · 6 lines
2.17.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for drm/i915/execlists: Don't trigger preemption if complete
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Don't trigger preemption if complete
URL : https://patchwork.freedesktop.org/series/42515/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4116_full -> Patchwork_8856_full =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_8856_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8856_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42515/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8856_full:
=== IGT changes ===
==== Possible regressions ====
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-glk: PASS -> INCOMPLETE
==== Warnings ====
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: SKIP -> PASS
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-pwrite:
shard-hsw: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_8856_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-apl: PASS -> FAIL (fdo#103375)
igt@kms_flip@dpms-vs-vblank-race-interruptible:
shard-hsw: PASS -> FAIL (fdo#103060)
igt@kms_flip@flip-vs-expired-vblank:
shard-glk: PASS -> FAIL (fdo#102887, fdo#105363)
igt@kms_flip@flip-vs-wf_vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_flip@wf_vblank-ts-check-interruptible:
shard-apl: PASS -> FAIL (fdo#100368)
igt@kms_frontbuffer_tracking@fbc-rgb565-draw-mmap-cpu:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@kms_flip@2x-plain-flip-ts-check:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_flip@flip-vs-blocking-wf-vblank:
shard-kbl: DMESG-FAIL (fdo#103558) -> PASS +1
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#102887) -> PASS
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-kbl: DMESG-WARN (fdo#103558, fdo#103313, fdo#105602) -> PASS
igt@kms_flip@plain-flip-fb-recreate-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS +2
igt@kms_flip_event_leak:
shard-kbl: DMESG-WARN (fdo#103558, fdo#105602) -> PASS +33 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (9 -> 7) ==
Missing (2): pig-glk-j4005 shard-glkb
== Build changes ==
* Linux: CI_DRM_4116 -> Patchwork_8856
CI_DRM_4116: 7ff375cb94000d93f7a9d541cb0c8180fbea80f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4453: 29ae12bd764e3b1876356e7628a32192b4ec9066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8856: 8eeceef247da5f6855bd89b0ab8caaa18a6ddbeb @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4453: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8856/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/execlists: Don't trigger preemption if complete (rev2)
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Don't trigger preemption if complete (rev2)
URL : https://patchwork.freedesktop.org/series/42515/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4116 -> Patchwork_8857 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42515/revisions/2/mbox/
== Known issues ==
Here are the changes found in Patchwork_8857 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_mmap_gtt@basic-small-bo-tiledx:
fi-gdg-551: PASS -> FAIL (fdo#102575)
igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106235)
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
fi-cnl-psr: PASS -> FAIL (fdo#103481)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-cnl-psr: PASS -> DMESG-WARN (fdo#104951)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-ivb-3520m: PASS -> DMESG-WARN (fdo#106084)
==== Possible fixes ====
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-ivb-3520m: DMESG-WARN (fdo#106084) -> PASS
fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
fdo#106235 https://bugs.freedesktop.org/show_bug.cgi?id=106235
== Participating hosts (38 -> 35) ==
Missing (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_4116 -> Patchwork_8857
CI_DRM_4116: 7ff375cb94000d93f7a9d541cb0c8180fbea80f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4453: 29ae12bd764e3b1876356e7628a32192b4ec9066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8857: c202ab8e8f6d1267e922e41ba3f75a88d3fbb3f1 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4453: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit
== Linux commits ==
c202ab8e8f6d drm/i915/execlists: Don't trigger preemption if complete
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8857/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/execlists: Don't trigger preemption if complete (rev2)
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: drm/i915/execlists: Don't trigger preemption if complete (rev2)
URL : https://patchwork.freedesktop.org/series/42515/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4116_full -> Patchwork_8857_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_8857_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_8857_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/42515/revisions/2/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_8857_full:
=== IGT changes ===
==== Warnings ====
igt@gem_exec_schedule@deep-bsd1:
shard-kbl: PASS -> SKIP
igt@gem_exec_schedule@deep-bsd2:
shard-kbl: SKIP -> PASS
igt@kms_frontbuffer_tracking@fbc-rgb565-draw-blt:
shard-snb: PASS -> SKIP== Known issues ==
Here are the changes found in Patchwork_8857_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_flip@2x-flip-vs-expired-vblank:
shard-hsw: PASS -> FAIL (fdo#102887)
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-hsw: PASS -> FAIL (fdo#105707)
igt@kms_flip@flip-vs-wf_vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#100368)
igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc:
shard-hsw: PASS -> DMESG-WARN (fdo#102614)
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
igt@kms_vblank@pipe-a-accuracy-idle:
shard-hsw: PASS -> FAIL (fdo#102583)
==== Possible fixes ====
igt@kms_flip@2x-plain-flip-ts-check:
shard-hsw: FAIL (fdo#103928) -> PASS
igt@kms_flip@flip-vs-blocking-wf-vblank:
shard-kbl: DMESG-FAIL (fdo#103558) -> PASS +1
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: FAIL (fdo#102887) -> PASS
igt@kms_flip@modeset-vs-vblank-race-interruptible:
shard-kbl: DMESG-WARN (fdo#105602, fdo#103558, fdo#103313) -> PASS
igt@kms_flip@plain-flip-fb-recreate-interruptible:
shard-glk: FAIL (fdo#100368) -> PASS +2
igt@kms_flip_event_leak:
shard-kbl: DMESG-WARN (fdo#105602, fdo#103558) -> PASS +33
igt@kms_sysfs_edid_timing:
shard-apl: WARN (fdo#100047) -> PASS fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103928 https://bugs.freedesktop.org/show_bug.cgi?id=103928
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105707 https://bugs.freedesktop.org/show_bug.cgi?id=105707
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (9 -> 8) ==
Missing (1): shard-glkb
== Build changes ==
* Linux: CI_DRM_4116 -> Patchwork_8857
CI_DRM_4116: 7ff375cb94000d93f7a9d541cb0c8180fbea80f2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4453: 29ae12bd764e3b1876356e7628a32192b4ec9066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_8857: c202ab8e8f6d1267e922e41ba3f75a88d3fbb3f1 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4453: d0a0bca2194a673c4d9a70a2256837c59213c64b @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8857/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Chris Wilson
Due to the latency of the tasklet running from ksoftirqd, by the time we process the execlist dequeue may be a long time behind the GPU. If the request was completed when we ran reschedule, we will not have tweaked its priority, but if it is still listed as being in-flight for dequeue we will use it as a reference for the rest of the queue, including requests from its own context which will now be at higher priority. This can cause us to issue a preempt-to-idle request, even though the request we want to preempt is already complete.
Reported-by Tvrtko Ursulin <[email protected]>Signed-off-by Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_lrc.c +0
-0
drivers/gpu/drm/i915/intel_lrc.c static void execlists_dequeue(struct intel_engine_cs *engine) · line 617
Quoted 9 lines
drivers/gpu/drm/i915/intel_lrc.c +2
-1@@ -610,7 +610,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine)if (!execlists_is_active (execlists,EXECLISTS_ACTIVE_HWACK )) goto unlock; -if (need_preempt (engine, last, execlists->queue_priority)) { +if (need_preempt (engine, last, execlists->queue_priority) && + !i915_request_completed (last)) {inject_preempt_context (engine); goto unlock; }
It makes sense on the most rudimentary level - don't preempt a context which is context saving itself.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Tvrtko Ursulin (2018-05-01 16:33:15)
Quoted 37 lines · Chris Wilson
Quoted 22 lines
Due to the latency of the tasklet running from ksoftirqd, by the time we process the execlist dequeue may be a long time behind the GPU. If the request was completed when we ran reschedule, we will not have tweaked its priority, but if it is still listed as being in-flight for dequeue we will use it as a reference for the rest of the queue, including requests from its own context which will now be at higher priority. This can cause us to issue a preempt-to-idle request, even though the request we want to preempt is already complete.
Reported-by Tvrtko Ursulin <[email protected]>Signed-off-by Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_lrc.c +0
-0drivers/gpu/drm/i915/intel_lrc.c static void execlists_dequeue(struct intel_engine_cs *engine) · line 617
Quoted 9 lines
drivers/gpu/drm/i915/intel_lrc.c +2
-1@@ -610,7 +610,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine)if (!execlists_is_active (execlists,EXECLISTS_ACTIVE_HWACK )) goto unlock; -if (need_preempt (engine, last, execlists->queue_priority)) { +if (need_preempt (engine, last, execlists->queue_priority) && + !i915_request_completed (last)) {inject_preempt_context (engine); goto unlock; }It makes sense on the most rudimentary level - don't preempt a context which is context saving itself.
Quoted 1 line
Reviewed-by Tvrtko Ursulin <[email protected]>
And picked up. To me the important connection is that when processing the dependency tree we don't touch completed requests, so it should also apply then during check of the inflight requests (as we may have skipped them during rescheduling).
Thanks,
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx