public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [RFC] GuC based preemption
@ 2017-02-23 19:08 Michał Winiarski
  2017-02-23 19:08 ` [RFC 01/11] drm/i915/scheduler: Remember request priority throughout its lifetime Michał Winiarski
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Michał Winiarski @ 2017-02-23 19:08 UTC (permalink / raw)
  To: intel-gfx

Now that we're able to unsubmit requests, let's try to actually preempt.

The series is partially based on "Preemption support for GPU scheduler":
https://lists.freedesktop.org/archives/intel-gfx/2015-December/082817.html

It requires "drm/i915/scheduler: Support user-defined priorities"

It's still not very mature, I'm observing GPU hangs with basic sanity checks
(create low_prio ctx, do work, create high_prio ctx, do work, expect that
high_prio finished before low_prio, repeat) due to incorrect handling of
the preemptive requests sent to GuC.

What I'd like to discuss is the overall approach and userspace interactions.
When considering preemption I've stayed with the "absolute" threshold approach
(we're only considering requests with priority higher than some threshold),
though I'm not sure whether it's the right way of doing things (since userspace
applications won't be able to increase their priority without CAP_SYS_ADMIN).
Perhaps it would be better to track the highest priority of the inflight
requests on each engine and consider preemption relative to that?

There's also the question of whether we want to have an "opt-in" interface for
userspace to explicitly state "I'm ready to handle preemption".
We know that we can safely preempt on the batch buffer boundary, unfortunately
when we try to preempt in the middle of user batches, there are cases where the
default settings are "unsafe" (e.g. require different batch buffer programming
from the userspace), which is why there seems to be a preference towards an
opt-in ABI (either by execbuf flag or context param).
The preemption granularity is being controlled through whitelisted
GEN8_CS_CHICKEN1 register, maybe we could get away with programming a "safe"
default values instead?

Awaiting for feedback!

-Michał

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-03-06 10:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 19:08 [RFC] GuC based preemption Michał Winiarski
2017-02-23 19:08 ` [RFC 01/11] drm/i915/scheduler: Remember request priority throughout its lifetime Michał Winiarski
2017-02-23 21:29   ` Chris Wilson
2017-02-23 19:08 ` [RFC 02/11] drm/i915/preempt: Add module parameter for preemption Michał Winiarski
2017-02-23 19:08 ` [RFC 03/11] drm/i915/preempt: Add information needed to track engine preempt state Michał Winiarski
2017-02-23 19:08 ` [RFC 04/11] drm/i915/preempt: Implement null preemption method Michał Winiarski
2017-02-23 21:37   ` Chris Wilson
2017-02-23 19:14 ` [RFC 05/11] drm/i915/preempt: Handle preemption event in guc tasklet Michał Winiarski
2017-03-01 12:57   ` Chris Wilson
2017-03-06 10:53     ` Chris Wilson
2017-02-23 19:14 ` [RFC 06/11] drm/i915/guc: Remove extra arguments from guc_client_alloc Michał Winiarski
2017-02-23 16:38   ` Oscar Mateo
2017-02-24  1:39     ` Daniele Ceraolo Spurio
2017-02-23 19:14 ` [RFC 07/11] drm/i915/guc: Add a second client, to be used for preemption Michał Winiarski
2017-02-23 19:14 ` [RFC 08/11] drm/i915/guc: Add preemption action to GuC firmware interface Michał Winiarski
2017-02-23 19:14 ` [RFC 09/11] HACK drm/i915/preempt: Actually send the preemption request Michał Winiarski
2017-02-23 19:14 ` [RFC 10/11] drm/i915/preempt: Emit MI_ARB_CHECK before the start of user batch Michał Winiarski
2017-03-01 12:53   ` Chris Wilson
2017-02-23 19:14 ` [RFC 11/11] drm/i915/preempt: Show engine preempt state in engine_info debugfs Michał Winiarski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox