1. 15 11月, 2016 1 次提交
    • P
      locking/mutex, drm: Introduce mutex_trylock_recursive() · 0f5225b0
      Peter Zijlstra 提交于
      By popular DRM demand, introduce mutex_trylock_recursive() to fix up the
      two GEM users.
      
      Without this it is very easy for these drivers to get stuck in
      low-memory situations and trigger OOM. Work is in progress to remove the
      need for this in at least i915.
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Ding Tianhong <dingtianhong@huawei.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Jason Low <jason.low2@hpe.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@us.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Terry Rudd <terry.rudd@hpe.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Will Deacon <Will.Deacon@arm.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      0f5225b0
  2. 03 11月, 2016 1 次提交
  3. 25 10月, 2016 1 次提交
    • P
      locking/drm: Kill mutex trickery · 3ab7c086
      Peter Zijlstra 提交于
      Poking at lock internals is not cool. Since I'm going to change the
      implementation this will break, take it out.
      Tested-by: NJason Low <jason.low2@hpe.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      3ab7c086
  4. 09 9月, 2016 2 次提交
  5. 05 8月, 2016 6 次提交
  6. 04 8月, 2016 2 次提交
  7. 26 7月, 2016 1 次提交
  8. 20 7月, 2016 2 次提交
  9. 14 7月, 2016 1 次提交
  10. 12 7月, 2016 1 次提交
  11. 05 7月, 2016 1 次提交
  12. 02 7月, 2016 1 次提交
  13. 24 6月, 2016 1 次提交
  14. 09 5月, 2016 1 次提交
  15. 02 5月, 2016 2 次提交
  16. 28 4月, 2016 1 次提交
    • C
      drm/i915: Move ioremap_wc tracking onto VMA · 8ef8561f
      Chris Wilson 提交于
      By tracking the iomapping on the VMA itself, we can share that area
      between multiple users. Also by only revoking the iomapping upon
      unbinding from the mappable portion of the GGTT, we can keep that iomap
      across multiple invocations (e.g. execlists context pinning).
      
      Note that by moving the iounnmap tracking to the VMA, we actually end up
      fixing a leak of the iomapping in intel_fbdev.
      
      v1.5: Rebase prompted by Tvrtko
      v2: Drop dev_priv parameter, we can recover the i915_ggtt from the vma.
      v3: Move handling of ioremap space exhaustion to vmap_purge and also
      allow vmallocs to recover old iomaps. Add Tvrtko's kerneldoc.
      v4: Fix a use-after-free in shrinker and rearrange i915_vma_iomap
      v5: Back to i915_vm_to_ggtt
      v6: Use i915_vma_pin_iomap and i915_vma_unpin_iomap to mark critical
      sections and ensure the VMA cannot be reaped whilst mapped.
      v7: Move i915_vma_iounmap so that consumers of the API are not tempted,
      and add iomem annotations
      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>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1461833819-3991-5-git-send-email-chris@chris-wilson.co.uk
      8ef8561f
  17. 20 4月, 2016 3 次提交
  18. 12 4月, 2016 1 次提交
  19. 05 4月, 2016 3 次提交
  20. 26 2月, 2016 1 次提交
  21. 27 1月, 2016 1 次提交
  22. 05 1月, 2016 1 次提交
  23. 13 10月, 2015 1 次提交
  24. 07 10月, 2015 4 次提交
    • C
      drm/i915: Avoid GPU stalls from kswapd · 5763ff04
      Chris Wilson 提交于
      Exclude active GPU pages from the purview of the background shrinker
      (kswapd), as these cause uncontrollable GPU stalls. Given that the
      shrinker is rerun until the freelists are satisfied, we should have
      opportunity in subsequent passes to recover the pages once idle. If the
      machine does run out of memory entirely, we have the forced idling in the
      oom-notifier as a means of releasing all the pages we can before an oom
      is prematurely executed.
      
      Note that this relies upon an up-front retire_requests to keep the
      inactive list in shape, which was added in a previous patch, mostly as
      execlist ctx pinning band-aids.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Add note about retire_requests.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5763ff04
    • C
      drm/i915: During shrink_all we only need to idle the GPU · c9c0f5ea
      Chris Wilson 提交于
      We can forgo an evict-everything here as the shrinker operation itself
      will unbind any vma as required. If we explicitly idle the GPU through a
      switch to the default context, we not only create a request in an
      illegal context (e.g. whilst shrinking during execbuf with a request
      already allocated), but switching to the default context will not free
      up the memory backing the active contexts - unless in the unlikely
      situation that context had already been closed (and just kept arrive by
      being the current context). The saving is near zero and the danger real.
      
      To compensate for the loss of the forced retire, add a couple of
      retire-requests to i915_gem_shirnk() - this should help free up any
      transitive cache from the requests.
      
      Note that the second retire_requests is for the benefit of the
      hand-rolled execlist ctx active tracking: We need to manually kick
      requests to get those unpinned again. Once that's fixed we can try to
      remove this again.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add summary of why we need a pile of retire_requests.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9c0f5ea
    • C
      drm/i915: Add a tracepoint for the shrinker · 3abafa53
      Chris Wilson 提交于
      Often it is very useful to know why we suddenly purge vast tracts of
      memory and surprisingly up until now we didn't even have a tracepoint
      for when we shrink our memory.
      
      Note that there are slab_start/end tracepoints already, but those
      don't cover the internal recursion when we directly call into our
      shrinker code. Hence a separate tracepoint seems justified. Also note
      that we don't really need a separate tracepoint for the actual amount
      of pages freed since we already have an unbind tracpoint for that.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add a note that there's also slab_start/end and why they're
      insufficient.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3abafa53
    • C
      drm/i915: shrinker_control->nr_to_scan is now unsigned long · 14387540
      Chris Wilson 提交于
      As the shrinker_control now passes us unsigned long targets, update our
      shrinker functions to match.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      14387540