]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/shrinker: Only shmemfs objects are backed by swap
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 20 Apr 2016 11:09:52 +0000 (12:09 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 20 Apr 2016 12:49:44 +0000 (13:49 +0100)
commitf661a33004b76acac3dc6d9f86224eefc238925f
treef8e9bd21f68e32afd73a336d79f68edd1bacbc02
parentf4c47115af9a8468ef95de53928915391837fd78
drm/i915/shrinker: Only shmemfs objects are backed by swap

Since we can only swap out shmemfs objects, those are the only ones that
can influence the ability of the shrinker to free pages. Currently, all
non-shmemfs objects have a raised pages_pin_count to protect them from
the shrinker, so this just makes the logic for can_release_pages()
clearer (and safer in future so that we don't over estimate our ability
to free up pages from future non-swappable objects).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1461150592-27818-3-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_gem_shrinker.c