[Intel-gfx] Locking review of bo_gem

Chris Wilson chris at chris-wilson.co.uk
Wed Dec 2 12:43:13 CET 2009


A substantial overhead in the construction of relocation trees for batch
buffers is the acquisition of the bufmgr_gem->mutex and the overhead of
reference counting. We note that during emit_reloc() we only update
internal fields of the bo so these should be guaranteed thread-safe by
sane calling conventions on the part of multi-threaded clients. During
batch buffer emission, we do not need to re-reference the objects when
adding to the temporary exec buffer array as the we hold keep the
reference from the batch buffer throughout the scope of the function.

Please review the locking changes carefully. :)
-ickle




More information about the Intel-gfx mailing list