[Intel-gfx] [PATCH] drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl

Chris Wilson chris at chris-wilson.co.uk
Sat Mar 4 10:42:38 UTC 2017


On Sat, Mar 04, 2017 at 10:35:32AM +0000, Chris Wilson wrote:
> Before we instantiate/pin the backing store for our use, we
> can prepopulate the shmemfs filp efficiently using the a
> write into the pagecache. We avoid the penalty of instantiating
> all the pages, important if the user is just writing to a few
> and never uses the object on the GPU, and using a direct write
> into shmemfs allows it to avoid the cost of retrieving a page
> (either swapin or clearing-before-use) before it is overwritten.
> 
> This can be extended later to provide additional specialisation for
> other backends (other than shmemfs).
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=99107
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.william.auld at gmail.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>

Whether to treat this as

Fixes: fe115628d567 ("drm/i915: Implement pwrite without struct-mutex")
Cc: <stable at vger.kernel.org> # v4.10+

? It prevents libva from taking the box down with it, so the impact is
severe enough that I think so - but it's not a fix, just a workaround.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list