[Intel-gfx] [PATCH v3 3/7] drm/i915: Require the vm mutex for i915_vma_bind()
Matthew Auld
matthew.auld at intel.com
Tue Dec 21 11:32:00 UTC 2021
On 17/12/2021 14:52, Thomas Hellström wrote:
> Protect updates of struct i915_vma flags and async binding / unbinding
> with the vm::mutex. This means that i915_vma_bind() needs to assert
> vm::mutex held. In order to make that possible drop the caching of
> kmap_atomic() maps around i915_vma_bind().
>
> An alternative would be to use kmap_local() but since we block cpu
> unplugging during sleeps inside kmap_local() sections this may have
> unwanted side-effects. Particularly since we might wait for gpu while
> holding the vm mutex.
>
> This change may theoretically increase execbuf cpu-usage on snb, but
> at least on non-highmem systems that increase should be very small.
>
> Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
More information about the Intel-gfx
mailing list