]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commitcd30a5031704aa8d833f62c8475a2f6d42a688a7
tree1c2c867521aaee3659bedd52cd0dd75dd8878eb6
parente3f3a0f26932b7a3f997b9e969a4663da6eb2429
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