]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Avoid evicting user fault mappable vma for pread/pwrite
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 08:44:00 +0000 (09:44 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 9 Oct 2017 16:07:29 +0000 (17:07 +0100)
commitad87d4e8d0b5b6a11f8a85bbc6db1479145f9e62
tree0702822d3fb2f87d16ced292730e7496e4d156ea
parenta0f44ff7b1e5d40fd86b1dc74c638e1199e5cc71
drm/i915: Avoid evicting user fault mappable vma for pread/pwrite

Both pread/pwrite GTT paths provide a fast fallback in case we cannot
map the whole object at a time. Currently, we use the fallback for very
large objects and for active objects that would require remapping, but
we can also add active fault mappable objects to the list that we want
to avoid evicting. The rationale is that such fault mappable objects are
in active use and to evict requires tearing down the CPU PTE and forcing
a page fault on the next access; more costly, and intefers with other
processes, than our per-page GTT fallback.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171009084401.29090-6-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem.c