[Mesa-dev] swr: RDTSC StopCapture hangs
Victor Moya del Barrio
victor.moya.del.barrio at gmail.com
Thu Sep 8 11:55:27 UTC 2016
Again playing with OpenSWR running on a (OpenSWR originally intended) many
core system.
When enabling RDTSC Buckets profiling sometimes OpenSWR gets stuck on
StopCapture.
StopCapture waits for all the threads to close all the pending buckets
(expects threads to be at bucket level 0) but the problem seems to be that
some threads get stuck at WorkerWaitForThreadEvent (level 1) and given that
StopCapture is called from SwrEndFrame (in the API thread) they are
probably not going to be awaken ever.
I don't have a clean solution here because I didn't study with detail how
the thread wait/sleep mechanism works (the real problem could be an issue
on why some threads are sleeping and other not) so for now I just commented
the code in StopCapture that expects all threads to be at level 0.
BTW. based on the RDTSC Buckets I see a very horrible utilization of the
threads in this system on glmark2. The BE threads seems to spend most of
the cycles on a spin loop looking for work through draw contexts and tiles
inside draw contexts, rather than say sleep if there is no real work to be
done until there is (but probably there should be as we want higher FPS)
(ie the BE thread gets stuck between the WorkerOnFifoBE and WorkerFoundWork
buckets).
Thread 39 (WORKER)
%Tot %Par Cycles CPE NumEvent CPE2 NumEvent2 Bucket
85.57 85.57 171485899 2243 76423 0 0
WorkerWorkOnFifoBE
24.45 28.58 49002850 125648 390 0 0 |->
WorkerFoundWork
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160908/a3140a9c/attachment.html>
More information about the mesa-dev
mailing list