[Intel-gfx] [igt-dev] [PATCH i-g-t 2/2] i915/gem_ctx_shared: Avoid clflush by using WC for readback

Matthew Auld matthew.william.auld at gmail.com
Thu Jul 25 14:41:54 UTC 2019


On Tue, 23 Jul 2019 at 17:17, Chris Wilson <chris at chris-wilson.co.uk> wrote:
>
> As we never officially write to the scratch buffer, the kernel will
> leave it in the CPU read domain upon execution. Our attempt to
> invalidate the CPU cache on !llc is therefore skipped as the kernel
> doesn't believe the backing store has been invalidated. Use a WC mmap to
> avoid the CPU cache for readback, and add an extra sanity check that the
> scratch buffer is found at the same location after execution. (This
> sanity check does not affect the failure rate on bsw, that is only fixed
> after realising that we do not clflush for the invalidate prior to the
> read).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111187
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the Intel-gfx mailing list