msm: kgsl: refactor snapshot to remove device->mutex locking
Because snapshot dumping held the device->mutex, there the
possibility of recursion on this lock through kgsl_mem_entry_put(),
which must take the lock deep in kgsl_mmu_unmap().
Restructure the dumping code so that the lock is not needed by
the snapshot woker or most of the sysfs show code.
Move all dynamic snapshot data structures into struct
kgsl_snapshot so it is clear that they follow its ownership
model. The device lock must still be held to touch device->snapshot,
but othewise it isn't needed. kgsl_device_snapshot() owns the
snapshot data until it finishes and queues the dump worker.
The dump worker owns the snapshot data until it sets the
dump_gate when it is finished. Then the data belongs to
the sysfs show code until it is finished.
Restructure the memory lookup to remove the need for many
'look up process by pagetable base' and 'look up GPU
address in any process' loops. This simplfies the locking further,
and is more efficient as well.
CRs-Fixed: 670306
Change-Id: I1ecdd5dd4bd0d93c368fac2b6ec7afc1a2cd7534
Signed-off-by:
Jeremy Gebben <jgebben@codeaurora.org>
Loading
Please register or sign in to comment