]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Do not lie about atomic timeout granularity
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 3 Mar 2016 16:21:27 +0000 (16:21 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 3 Mar 2016 17:29:09 +0000 (17:29 +0000)
commitb4c9db235bf31c6e483932f57c248336848d1201
treebdbc5e48892f9dcd1e472e48bcfe36cca5401e31
parent01e431a50551b185677ba2bfa9611a89f2da1cb8
drm/i915: Do not lie about atomic timeout granularity

Currently the wait_for_atomic_us only allows for a jiffie
timeout granularity which is not nice towards callers
requesting small micro-second timeouts.

Re-implement it so micro-second timeout granularity is really
supported and not just in the name of the macro.

This has another beneficial side effect that it improves
"gem_latency -n 100" results by approximately 2.5% (throughput
and latencies) and 3% (CPU usage). (Note this improvement is
relative to not yet merged execlist lock uncontention patch
which moves the CSB MMIO outside this lock.)

It also shrinks some hot functions like fw_domains_get by a
tiny 3%.

v2:
  * Warn when used from non-atomic context (if possible).
  * Warn on too long atomic waits.

v3:
  * Added comment explaining CONFIG_PREEMPT_COUNT.
  * Fixed pre-processor indentation.
  (Chris Wilson)

v4:
 * Commit msg update (gem_latency) and rebase.

v5:
 * Commit message re-wording.
 * Added comment about no need for double cond check. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_drv.h