]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Excise the per-batch whitelist from the context
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Nov 2019 11:34:24 +0000 (11:34 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Nov 2019 11:39:50 +0000 (11:39 +0000)
commitcb7bcf406fc323bc0b19c9af13c5009d1cdf8c30
tree1c2c867521aaee3659bedd52cd0dd75dd8878eb6
parent7c1eae0f1a7e32a9176d415a8ea0981d4858def6
drm/i915/gem: Excise the per-batch whitelist from the context

One does not lightly add a new hidden struct_mutex dependency deep within
the execbuf bowels! The immediate suspicion in seeing the whitelist
cached on the context, is that it is intended to be preserved between
batches, as the kernel is quite adept at caching small allocations
itself. But no, it's sole purpose is to serialise command submission in
order to save a kmalloc on a slow, slow path!

By removing the whitelist dependency from the context, our freedom to
chop the big struct_mutex is greatly augmented.

v2: s/set_bit/__set_bit/ as the whitelist shall never be accessed
concurrently.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191128113424.3885958-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gem/i915_gem_context_types.h
drivers/gpu/drm/i915/i915_cmd_parser.c