1. 27 3月, 2017 3 次提交
  2. 21 3月, 2017 1 次提交
  3. 17 3月, 2017 2 次提交
  4. 16 3月, 2017 1 次提交
    • C
      drm/i915: Replace irq_seqno_barrier on hws write with a clflush · 14a6bbf9
      Chris Wilson 提交于
      When manually overwriting the HWS, rather than assume irq_seqno_barrier
      does the right thing, we can explicitly flush the cacheline instead.
      This avoids us calling the engine->irq_seqno_barrier() from an illegal
      context:
      
      [ 1472.651797] BUG: scheduling while atomic: migration/0/11/0x00000002
      [ 1472.651807] Modules linked in: ctr ccm arc4 snd_hda_codec_hdmi bnep rfcomm iwldvm snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel mac80211 snd_hda_codec snd_hda_core snd_pcm dm_multipath snd_hwdep intel_powerclamp coretemp snd_seq_midi crct10dif_pclmul snd_seq_midi_event crc32_pclmul iwlwifi ghash_clmulni_intel btusb snd_rawmidi btrtl aesni_intel btbcm aes_x86_64 crypto_simd btintel cryptd glue_helper bluetooth snd_seq cfg80211 snd_timer snd_seq_device intel_ips binfmt_misc snd mei_me soundcore mei dm_mirror dm_region_hash dm_log i915 intel_gtt i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea prime_numbers e1000e drm ahci libahci
      [ 1472.651897] CPU: 0 PID: 11 Comm: migration/0 Tainted: G     U          4.11.0-rc1+ #203
      [ 1472.651899] Hardware name: LENOVO 514328U/514328U, BIOS 6QET44WW (1.14 ) 04/20/2010
      [ 1472.651900] Call Trace:
      [ 1472.651913]  dump_stack+0x63/0x90
      [ 1472.651922]  __schedule_bug+0x5d/0x6b
      [ 1472.651930]  __schedule+0x46a/0x5f0
      [ 1472.651934]  schedule+0x38/0x90
      [ 1472.651938]  schedule_hrtimeout_range_clock+0x85/0x110
      [ 1472.651945]  ? hrtimer_init+0x10/0x10
      [ 1472.651949]  schedule_hrtimeout_range+0xe/0x10
      [ 1472.651952]  usleep_range+0x4d/0x60
      [ 1472.652037]  gen5_seqno_barrier+0x13/0x20 [i915]
      [ 1472.652101]  intel_engine_init_global_seqno+0xd7/0x160 [i915]
      [ 1472.652160]  __i915_gem_set_wedged_BKL+0xa0/0x180 [i915]
      [ 1472.652166]  multi_cpu_stop+0xbb/0xe0
      [ 1472.652170]  ? cpu_stop_queue_work+0x90/0x90
      [ 1472.652174]  cpu_stopper_thread+0x82/0x110
      [ 1472.652179]  smpboot_thread_fn+0x137/0x190
      [ 1472.652184]  kthread+0xf7/0x130
      [ 1472.652187]  ? sort_range+0x20/0x20
      [ 1472.652191]  ? kthread_park+0x90/0x90
      [ 1472.652195]  ret_from_fork+0x2c/0x40
      
      Testcase: igt/gem_eio #ilk
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170314111452.9375-1-chris@chris-wilson.co.ukReviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      14a6bbf9
  5. 04 3月, 2017 2 次提交
  6. 03 3月, 2017 2 次提交
  7. 28 2月, 2017 3 次提交
    • C
      drm/i915: Delay disabling the user interrupt for breadcrumbs · 67b807a8
      Chris Wilson 提交于
      A significant cost in setting up a wait is the overhead of enabling the
      interrupt. As we disable the interrupt whenever the queue of waiters is
      empty, if we are frequently waiting on alternating batches, we end up
      re-enabling the interrupt on a frequent basis. We do want to disable the
      interrupt during normal operations as under high load it may add several
      thousand interrupts/s - we have been known in the past to occupy whole
      cores with our interrupt handler after accidentally leaving user
      interrupts enabled. As a compromise, leave the interrupt enabled until
      the next IRQ, or the system is idle. This gives a small window for a
      waiter to keep the interrupt active and not be delayed by having to
      re-enable the interrupt.
      
      v2: Restore hangcheck/missed-irq detection for continuations
      v3: Be more careful restoring the hangcheck timer after reset
      v4: Be more careful restoring the fake irq after reset (if required!)
      v5: Redo changes to intel_engine_wakeup()
      v6: Factor out __intel_engine_wakeup()
      v7: Improve commentary for declaring a missed wakeup
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-4-chris@chris-wilson.co.uk
      67b807a8
    • C
      drm/i915: Signal first fence from irq handler if complete · 56299fb7
      Chris Wilson 提交于
      As execlists and other non-semaphore multi-engine devices coordinate
      between engines using interrupts, we can shave off a few 10s of
      microsecond of scheduling latency by doing the fence signaling from the
      interrupt as opposed to a RT kthread. (Realistically the delay adds
      about 1% to an individual cross-engine workload.) We only signal the
      first fence in order to limit the amount of work we move into the
      interrupt handler. We also have to remember that our breadcrumbs may be
      unordered with respect to the interrupt and so we still require the
      waiter process to perform some heavyweight coherency fixups, as well as
      traversing the tree of waiters.
      
      v2: No need for early exit in irq handler - it breaks the flow between
      patches and prevents the tracepoint
      v3: Restore rcu hold across irq signaling of request
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-2-chris@chris-wilson.co.uk
      56299fb7
    • C
      drm/i915: Report both waiters and success from intel_engine_wakeup() · 8d769ea7
      Chris Wilson 提交于
      The two users of the return value from intel_engine_wakeup() are
      expecting different results. In the breadcrumbs hangcheck, we are using
      it to determine whether wake_up_process() detected the waiter was
      currently running (and if so we presume that it hasn't yet missed the
      interrupt). However, in the fake_irq path, we are using the return value
      as a check as to whether there are any waiters, and so we may
      incorrectly stop the fake-irq if that waiter was currently running.
      
      To handle the two different needs, return both bits of information! We
      uninline it from the irq path in preparation for the next patch which
      makes the irq hotpath special and relegates intel_engine_wakeup() to the
      slow fixup paths.
      
      v2: s/ret/result/
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-1-chris@chris-wilson.co.uk
      8d769ea7
  8. 23 2月, 2017 4 次提交
  9. 17 2月, 2017 3 次提交
  10. 15 2月, 2017 1 次提交
  11. 14 2月, 2017 2 次提交
  12. 11 2月, 2017 1 次提交
  13. 07 2月, 2017 2 次提交
  14. 30 1月, 2017 1 次提交
  15. 24 1月, 2017 3 次提交
  16. 23 1月, 2017 1 次提交
  17. 24 12月, 2016 1 次提交
  18. 19 12月, 2016 2 次提交
    • C
      drm/i915: Swap if(enable_execlists) in i915_gem_request_alloc for a vfunc · f73e7399
      Chris Wilson 提交于
      A fairly trivial move of a matching pair of routines (for preparing a
      request for construction) onto an engine vfunc. The ulterior motive is
      to be able to create a mock request implementation.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-7-chris@chris-wilson.co.uk
      f73e7399
    • C
      drm/i915: Unify active context tracking between legacy/execlists/guc · e8a9c58f
      Chris Wilson 提交于
      The requests conversion introduced a nasty bug where we could generate a
      new request in the middle of constructing a request if we needed to idle
      the system in order to evict space for a context. The request to idle
      would be executed (and waited upon) before the current one, creating a
      minor havoc in the seqno accounting, as we will consider the current
      request to already be completed (prior to deferred seqno assignment) but
      ring->last_retired_head would have been updated and still could allow
      us to overwrite the current request before execution.
      
      We also employed two different mechanisms to track the active context
      until it was switched out. The legacy method allowed for waiting upon an
      active context (it could forcibly evict any vma, including context's),
      but the execlists method took a step backwards by pinning the vma for
      the entire active lifespan of the context (the only way to evict was to
      idle the entire GPU, not individual contexts). However, to circumvent
      the tricky issue of locking (i.e. we cannot take struct_mutex at the
      time of i915_gem_request_submit(), where we would want to move the
      previous context onto the active tracker and unpin it), we take the
      execlists approach and keep the contexts pinned until retirement.
      The benefit of the execlists approach, more important for execlists than
      legacy, was the reduction in work in pinning the context for each
      request - as the context was kept pinned until idle, it could short
      circuit the pinning for all active contexts.
      
      We introduce new engine vfuncs to pin and unpin the context
      respectively. The context is pinned at the start of the request, and
      only unpinned when the following request is retired (this ensures that
      the context is idle and coherent in main memory before we unpin it). We
      move the engine->last_context tracking into the retirement itself
      (rather than during request submission) in order to allow the submission
      to be reordered or unwound without undue difficultly.
      
      And finally an ulterior motive for unifying context handling was to
      prepare for mock requests.
      
      v2: Rename to last_retired_context, split out legacy_context tracking
      for MI_SET_CONTEXT.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161218153724.8439-3-chris@chris-wilson.co.uk
      e8a9c58f
  19. 21 11月, 2016 2 次提交
    • M
      drm/i915: Decouple hang detection from hangcheck period · 3fe3b030
      Mika Kuoppala 提交于
      Hangcheck state accumulation has gained more steps
      along the years, like head movement and more recently the
      subunit inactivity check. As the subunit sampling is only
      done if the previous state check showed inactivity, we
      have added more stages (and time) to reach a hang verdict.
      
      Asymmetric engine states led to different actual weight of
      'one hangcheck unit' and it was demonstrated in some
      hangs that due to difference in stages, simpler engines
      were accused falsely of a hang as their scoring was much
      more quicker to accumulate above the hang treshold.
      
      To completely decouple the hangcheck guilty score
      from the hangcheck period, convert hangcheck score to a
      rough period of inactivity measurement. As these are
      tracked as jiffies, they are meaningful also across
      reset boundaries. This makes finding a guilty engine
      more accurate across multi engine activity scenarios,
      especially across asymmetric engines.
      
      We lose the ability to detect cross batch malicious attempts
      to hinder the progress. Plan is to move this functionality
      to be part of context banning which is more natural fit,
      later in the series.
      
      v2: use time_before macros (Chris)
          reinstate the pardoning of moving engine after hc (Chris)
      v3: avoid global state for per engine stall detection (Chris)
      v4: take timeline last retirement into account (Chris)
      v5: do debug print on pardoning, split out retirement timestamp (Chris)
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      3fe3b030
    • M
      drm/i915: Split up hangcheck phases · 6e16d028
      Mika Kuoppala 提交于
      In order to simplify hangcheck state keeping, split hangcheck
      per engine loop in three phases: state load, action, state save.
      
      Add few more hangcheck actions to separate between seqno, head
      and subunit movements. This helps to gather all the hangcheck
      actions under a single switch umbrella.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      6e16d028
  20. 15 11月, 2016 3 次提交