1. 05 Jun, 2019 15 commits
  2. 04 Jun, 2019 21 commits
  3. 01 Jun, 2019 1 commit
  4. 31 May, 2019 3 commits
    • Chris Wilson's avatar
      drm/i915: Report all objects with allocated pages to the shrinker · d82b4b26
      Chris Wilson authored
      Currently, we try to report to the shrinker the precise number of
      objects (pages) that are available to be reaped at this moment. This
      requires searching all objects with allocated pages to see if they
      fulfill the search criteria, and this count is performed quite
      frequently. (The shrinker tries to free ~128 pages on each invocation,
      before which we count all the objects; counting takes longer than
      unbinding the objects!) If we take the pragmatic view that with
      sufficient desire, all objects are eventually reapable (they become
      inactive, or no longer used as framebuffer etc), we can simply return
      the count of pinned pages maintained during get_pages/put_pages rather
      than walk the lists every time.
      
      The downside is that we may (slightly) over-report the number of
      objects/pages we could shrink and so penalize ourselves by shrinking
      more than required. This is mitigated by keeping the order in which we
      shrink objects such that we avoid penalizing active and frequently used
      objects, and if memory is so tight that we need to free them we would
      need to anyway.
      
      v2: Only expose shrinkable objects to the shrinker; a small reduction in
      not considering stolen and foreign objects.
      v3: Restore the tracking from a "backup" copy from before the gem/ split
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190530203500.26272-2-chris@chris-wilson.co.uk
      d82b4b26
    • Chris Wilson's avatar
      drm/i915: Track the purgeable objects on a separate eviction list · 3b4fa964
      Chris Wilson authored
      Currently the purgeable objects, I915_MADV_DONTNEED, are mixed in the
      normal bound/unbound lists. Every shrinker pass starts with an attempt
      to purge from this set of unneeded objects, which entails us doing a
      walk over both lists looking for any candidates. If there are none, and
      since we are shrinking we can reasonably assume that the lists are
      full!, this becomes a very slow futile walk.
      
      If we separate out the purgeable objects into own list, this search then
      becomes its own phase that is preferentially handled during shrinking.
      Instead the cost becomes that we then need to filter the purgeable list
      if we want to distinguish between bound and unbound objects.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Reviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190530203500.26272-1-chris@chris-wilson.co.uk
      3b4fa964
    • Jani Nikula's avatar
      drm/i915: add force_probe module parameter to replace alpha_support · 7ef5ef5c
      Jani Nikula authored
      The i915.alpha_support module parameter has caused some confusion along
      the way. Add new i915.force_probe parameter to specify PCI IDs of
      devices to probe, when the devices are recognized but not automatically
      probed by the driver. The name is intended to reflect what the parameter
      effectively does, avoiding any overloaded semantics of "alpha" and
      "support".
      
      The parameter supports "" to disable, "<pci-id>,[<pci-id>,...]" to
      enable force probe for one or more devices, and "*" to enable force
      probe for all known devices.
      
      Also add new CONFIG_DRM_I915_FORCE_PROBE config option to replace the
      DRM_I915_ALPHA_SUPPORT option. This defaults to "*" if
      DRM_I915_ALPHA_SUPPORT=y.
      
      Instead of replacing i915.alpha_support immediately, let the two coexist
      for a while, with a deprecation message, for a transition period.
      
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Acked-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190506134801.28751-1-jani.nikula@intel.com
      7ef5ef5c