]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gtt: Avoid overflowing the WC stash
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 29 May 2019 09:34:07 +0000 (10:34 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 29 May 2019 15:42:38 +0000 (16:42 +0100)
commit8e954fcf04791cf22c848411822dd0745b8e169e
treea9900db9bb113fc573d38f04e7b524ec66619650
parentb4cbafe905b0cb81495b50e6fad63ff348f1014d
drm/i915/gtt: Avoid overflowing the WC stash

An interesting issue cropped with making the pagetables be allocated and
freed concurrently (i.e. removing their grandeous struct_mutex guard)
was that we would overflow the page stash. This happens when we have
multiple allocators grabbing WC pages such that we fill the vm's local
page stash and then when we free another page, the page stash is already
full and we overflow.

The fix is quite simple: to check for a full page stash before adding
another. This results in us keeping a vm local page stash around for
much longer, which is both a blessing and a curse.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190529093407.31697-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c