1. 01 5月, 2020 1 次提交
  2. 30 4月, 2020 2 次提交
    • C
      drm/i915/gt: Always enable busy-stats for execlists · 426d0073
      Chris Wilson 提交于
      In the near future, we will utilize the busy-stats on each engine to
      approximate the C0 cycles of each, and use that as an input to a manual
      RPS mechanism. That entails having busy-stats always enabled and so we
      can remove the enable/disable routines and simplify the pmu setup. As a
      consequence of always having the stats enabled, we can also show the
      current active time via sysfs/engine/xcs/active_time_ns.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200429205446.3259-1-chris@chris-wilson.co.uk
      426d0073
    • C
      drm/i915/gt: Keep a no-frills swappable copy of the default context state · be1cb55a
      Chris Wilson 提交于
      We need to keep the default context state around to instantiate new
      contexts (aka golden rendercontext), and we also keep it pinned while
      the engine is active so that we can quickly reset a hanging context.
      However, the default contexts are large enough to merit keeping in
      swappable memory as opposed to kernel memory, so we store them inside
      shmemfs. Currently, we use the normal GEM objects to create the default
      context image, but we can throw away all but the shmemfs file.
      
      This greatly simplifies the tricky power management code which wants to
      run underneath the normal GT locking, and we definitely do not want to
      use any high level objects that may appear to recurse back into the GT.
      Though perhaps the primary advantage of the complex GEM object is that
      we aggressively cache the mapping, but here we are recreating the
      vm_area everytime time we unpark. At the worst, we add a lightweight
      cache, but first find a microbenchmark that is impacted.
      
      Having started to create some utility functions to make working with
      shmemfs objects easier, we can start putting them to wider use, where
      GEM objects are overkill, such as storing persistent error state.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Ramalingam C <ramalingam.c@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200429172429.6054-1-chris@chris-wilson.co.uk
      be1cb55a
  3. 29 4月, 2020 1 次提交
  4. 07 4月, 2020 1 次提交
    • C
      drm/i915/gt: Yield the timeslice if caught waiting on a user semaphore · c4e8ba73
      Chris Wilson 提交于
      If we find ourselves waiting on a MI_SEMAPHORE_WAIT, either within the
      user batch or in our own preamble, the engine raises a
      GT_WAIT_ON_SEMAPHORE interrupt. We can unmask that interrupt and so
      respond to a semaphore wait by yielding the timeslice, if we have
      another context to yield to!
      
      The only real complication is that the interrupt is only generated for
      the start of the semaphore wait, and is asynchronous to our
      process_csb() -- that is, we may not have registered the timeslice before
      we see the interrupt. To ensure we don't miss a potential semaphore
      blocking forward progress (e.g. selftests/live_timeslice_preempt) we mark
      the interrupt and apply it to the next timeslice regardless of whether it
      was active at the time.
      
      v2: We use semaphores in preempt-to-busy, within the timeslicing
      implementation itself! Ergo, when we do insert a preemption due to an
      expired timeslice, the new context may start with the missed semaphore
      flagged by the retired context and be yielded, ad infinitum. To avoid
      this, read the context id at the time of the semaphore interrupt and
      only yield if that context is still active.
      
      Fixes: 8ee36e04 ("drm/i915/execlists: Minimalistic timeslicing")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Kenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200407130811.17321-1-chris@chris-wilson.co.uk
      c4e8ba73
  5. 04 4月, 2020 1 次提交
  6. 03 4月, 2020 1 次提交
    • C
      drm/i915: Keep a per-engine request pool · 43acd651
      Chris Wilson 提交于
      Add a tiny per-engine request mempool so that we should always have a
      request available for powermanagement allocations from tricky
      contexts. This reserve is expected to be only used for kernel
      contexts when barriers must be emitted [almost] without fail.
      
      The main consumer for this reserved request is expected to be engine-pm,
      for which we know that there will always be at least the previous pm
      request that we can reuse under mempressure (so there should always be
      a spare request for engine_park()).
      
      This is an alternative to using a comparatively bulky mempool, which
      requires custom handling for both our reserved allocation requirement
      and to protect our TYPESAFE_BY_RCU slab cache. The advantage of mempool
      would be that it would allow us to keep a larger per-engine request
      pool. However, converting over to mempool is straightforward should the
      need arise.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-and-tested-by: NJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200402184037.21630-1-chris@chris-wilson.co.uk
      43acd651
  7. 01 4月, 2020 2 次提交
  8. 26 3月, 2020 1 次提交
  9. 12 3月, 2020 1 次提交
  10. 11 3月, 2020 1 次提交
  11. 29 2月, 2020 1 次提交
  12. 22 2月, 2020 1 次提交
  13. 19 2月, 2020 1 次提交
  14. 12 2月, 2020 1 次提交
  15. 08 2月, 2020 1 次提交
  16. 01 2月, 2020 1 次提交
  17. 31 1月, 2020 1 次提交
  18. 30 1月, 2020 2 次提交
  19. 29 1月, 2020 1 次提交
  20. 25 1月, 2020 1 次提交
  21. 22 1月, 2020 1 次提交
  22. 18 1月, 2020 2 次提交
  23. 17 1月, 2020 1 次提交
  24. 10 1月, 2020 1 次提交
  25. 24 12月, 2019 1 次提交
  26. 22 12月, 2019 4 次提交
  27. 20 12月, 2019 2 次提交
  28. 14 12月, 2019 1 次提交
  29. 06 12月, 2019 1 次提交
  30. 28 11月, 2019 1 次提交
  31. 25 11月, 2019 2 次提交
    • C
      drm/i915/gt: Schedule request retirement when timeline idles · 31177017
      Chris Wilson 提交于
      The major drawback of commit 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX
      corruption WA") is that it disables RC6 while Skylake (and friends) is
      active, and we do not consider the GPU idle until all outstanding
      requests have been retired and the engine switched over to the kernel
      context. If userspace is idle, this task falls onto our background idle
      worker, which only runs roughly once a second, meaning that userspace has
      to have been idle for a couple of seconds before we enable RC6 again.
      Naturally, this causes us to consume considerably more energy than
      before as powersaving is effectively disabled while a display server
      (here's looking at you Xorg) is running.
      
      As execlists will get a completion event as each context is completed,
      we can use this interrupt to queue a retire worker bound to this engine
      to cleanup idle timelines. We will then immediately notice the idle
      engine (without userspace intervention or the aid of the background
      retire worker) and start parking the GPU. Thus during light workloads,
      we will do much more work to idle the GPU faster...  Hopefully with
      commensurate power saving!
      
      v2: Watch context completions and only look at those local to the engine
      when retiring to reduce the amount of excess work we perform.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112315
      References: 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      References: 2248a283 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-3-chris@chris-wilson.co.uk
      (cherry picked from commit 4f88f874)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      31177017
    • C
      drm/i915/gt: Schedule request retirement when timeline idles · 4f88f874
      Chris Wilson 提交于
      The major drawback of commit 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX
      corruption WA") is that it disables RC6 while Skylake (and friends) is
      active, and we do not consider the GPU idle until all outstanding
      requests have been retired and the engine switched over to the kernel
      context. If userspace is idle, this task falls onto our background idle
      worker, which only runs roughly once a second, meaning that userspace has
      to have been idle for a couple of seconds before we enable RC6 again.
      Naturally, this causes us to consume considerably more energy than
      before as powersaving is effectively disabled while a display server
      (here's looking at you Xorg) is running.
      
      As execlists will get a completion event as each context is completed,
      we can use this interrupt to queue a retire worker bound to this engine
      to cleanup idle timelines. We will then immediately notice the idle
      engine (without userspace intervention or the aid of the background
      retire worker) and start parking the GPU. Thus during light workloads,
      we will do much more work to idle the GPU faster...  Hopefully with
      commensurate power saving!
      
      v2: Watch context completions and only look at those local to the engine
      when retiring to reduce the amount of excess work we perform.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112315
      References: 7e34f4e4 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      References: 2248a283 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-3-chris@chris-wilson.co.uk
      4f88f874