summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/Kconfig.profile
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-02-28 16:17:13 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2020-02-29 01:03:41 +0300
commit062444bbc6859dbe9991673ffd377a4af4d76d51 (patch)
tree6dfa9be3ece237031f47c7ffc5ae2ffdf70533cd /drivers/gpu/drm/i915/Kconfig.profile
parent1a2695a7465971f28d8c44d6a282b6a2dd91e96f (diff)
downloadlinux-062444bbc6859dbe9991673ffd377a4af4d76d51.tar.xz
drm/i915/gt: Expose busywait duration to sysfs
We busywait on an inflight request (one that is currently executing on HW, and so might complete quickly) prior to setting up an interrupt and sleeping. The trade off is that we keep an expensive CPU core busy in order to avoid wake up latency: where that trade off should lie is best left to the sysadmin. The busywait mechanism can be compiled out with ./scripts/config --set-val DRM_I915_SPIN_REQUEST 0 The maximum busywait duration can be adjusted per-engine using, /sys/class/drm/card?/engine/*/ms_busywait_duration_ns Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Steve Carbonari <steven.carbonari@intel.com> Tested-by: Steve Carbonari <steven.carbonari@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200228131716.3243616-4-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/Kconfig.profile')
-rw-r--r--drivers/gpu/drm/i915/Kconfig.profile9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/Kconfig.profile b/drivers/gpu/drm/i915/Kconfig.profile
index d8d4a16179bd..9ee3b59685b9 100644
--- a/drivers/gpu/drm/i915/Kconfig.profile
+++ b/drivers/gpu/drm/i915/Kconfig.profile
@@ -35,9 +35,9 @@ config DRM_I915_PREEMPT_TIMEOUT
May be 0 to disable the timeout.
-config DRM_I915_SPIN_REQUEST
- int "Busywait for request completion (us)"
- default 5 # microseconds
+config DRM_I915_MAX_REQUEST_BUSYWAIT
+ int "Busywait for request completion limit (ns)"
+ default 8000 # nanoseconds
help
Before sleeping waiting for a request (GPU operation) to complete,
we may spend some time polling for its completion. As the IRQ may
@@ -45,6 +45,9 @@ config DRM_I915_SPIN_REQUEST
check if the request will complete in the time it would have taken
us to enable the interrupt.
+ This is adjustable via
+ /sys/class/drm/card?/engine/*/max_busywait_duration_ns
+
May be 0 to disable the initial spin. In practice, we estimate
the cost of enabling the interrupt (if currently disabled) to be
a few microseconds.