[Intel-gfx] [PATCH 01/17] drm/i915: Skip holding an object reference for execbuf preparation

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Aug 22 11:21:16 UTC 2016


On ma, 2016-08-22 at 09:03 +0100, Chris Wilson wrote:
> This is a golden oldie! We can shave a couple of locked instructions for
> about 10% of the per-object overhead by not taking an extra kref whilst
> reserving objects for an execbuf. Due to lock management this is safe,
> as we cannot lose the original object reference without the lock.
> Equally, because this relies on the heavy BKL^W struct_mutex, it is also
> likely to be only a temporary optimisation until we have fine grained
> locking. (That's what we said 5 years ago, so there's probably another
> 10 years before we get around to finer grained locking!)
> 

Should we sprinkle a couple of lockdep_assert_held for documentation?

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list