• Tvrtko Ursulin's avatar
    drm/i915: Fail too long user submissions by default · e8dbb566
    Tvrtko Ursulin authored
    A new Kconfig option CONFIG_DRM_I915_REQUEST_TIMEOUT is added, defaulting
    to 20s, and this timeout is applied to all users contexts using the
    previously added watchdog facility.
    
    Result of this is that any user submission will simply fail after this
    timeout, either causing a reset (for non-preemptable), or incomplete
    results.
    
    This can have an effect that workloads which used to work fine will
    suddenly start failing. Even workloads comprised of short batches but in
    long dependency chains can be terminated.
    
    And because of lack of agreement on usefulness and safety of fence error
    propagation this partial execution can be invisible to userspace even if
    it is "listening" to returned fence status.
    
    Another interaction is with hangcheck where care needs to be taken timeout
    is not set lower or close to three times the heartbeat interval. Otherwise
    a hang in any application can cause complete termination of all
    submissions from unrelated clients. Any users modifying the per engine
    heartbeat intervals therefore need to be aware of this potential denial of
    service to avoid inadvertently enabling it.
    
    Given all this I am personally not convinced the scheme is a good idea.
    Intuitively it feels object importers would be better positioned to
    enforce the time they are willing to wait for something to complete.
    
    v2:
     * Improved commit message and Kconfig text.
     * Pull in some helper code from patch which got dropped.
    
    v3:
     * Bump timeout to 20s to see if it helps Tigerlake.
    Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Acked-by: default avatarMatthew Auld <matthew.auld@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-7-tvrtko.ursulin@linux.intel.com
    e8dbb566
intel_context_param.h 506 Bytes