Bug 32036 - OpenVG demos show inadequate CPU usage and memory leak
Summary: OpenVG demos show inadequate CPU usage and memory leak
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-01 19:36 UTC by Sergey Kondakov
Modified: 2010-12-02 22:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sergey Kondakov 2010-12-01 19:36:57 UTC
when any of "non-trivial" OpenVG demos from mesa-demos is run, it uses >60% CPU time and also causes 'X' process to use inadequate CPU time.
on laptop with RV515 `top` shows:
lion -> X~10% demo~80% + constant memory leak ~20MB VIRT/RES per second
sp   -> X~1%  demo~100%
text -> X~50% demo~67%

it behaves similarly on R770 hardware. all that doesn't make its rendering of vector graphic look GPU-accelerated in any way.
Comment 1 Sergey Kondakov 2010-12-01 19:40:23 UTC
and yeah - mesa, libdrm, xf86-video-ati, mesa-progs are recent git (post-openvg-1.1-merge, anyway);
X is 1.9.2.901 (1.9.3 RC 1).
Comment 2 Chia-I Wu 2010-12-02 01:01:07 UTC
Commit 1222800fd20 to mesa-demos should fix the high CPU usage you noticed in sp and text.  It fixes a busy waiting bug in eglut.

lion, or other demos that animate, does not throttle the frame rate.  It is normal that the CPU usage is high.  As for the leak, I will look into it.
Comment 3 Chia-I Wu 2010-12-02 03:28:38 UTC
Ok, the CPU hogging in text demo and memory leaks in lion should be fixed in latest mesa and mesa-demos.  Could you try again?
Comment 4 Sergey Kondakov 2010-12-02 06:12:11 UTC
(In reply to comment #3)
> Ok, the CPU hogging in text demo and memory leaks in lion should be fixed in
> latest mesa and mesa-demos.  Could you try again?

with recent mesa and mesa-demos revision lion no longer leak memory and consume same, small, amount as other demos.
but it still takes same amount of CPU time.

(In reply to comment #2)
> lion, or other demos that animate, does not throttle the frame rate.  It is
> normal that the CPU usage is high.  As for the leak, I will look into it.

but is it "normal" to hog CPU on real hw driver, not softpipe ?
Comment 5 Chia-I Wu 2010-12-02 07:43:47 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Ok, the CPU hogging in text demo and memory leaks in lion should be fixed in
> > latest mesa and mesa-demos.  Could you try again?
> 
> with recent mesa and mesa-demos revision lion no longer leak memory and consume
> same, small, amount as other demos.
> but it still takes same amount of CPU time.
> 
> (In reply to comment #2)
> > lion, or other demos that animate, does not throttle the frame rate.  It is
> > normal that the CPU usage is high.  As for the leak, I will look into it.
> 
> but is it "normal" to hog CPU on real hw driver, not softpipe ?
The demo is not GPU-bound.  The rotation of the lion makes Vega recreate the vertex buffers of the paths every frame.

That should be something that can be avoided, but it is not the case now unfortunately.
Comment 6 Sergey Kondakov 2010-12-02 08:15:40 UTC
i forgot to actually write but there appears to be no extensive CPU usage for "sp" and "text" demos anymore. everything, beside "lion" CPU usage is fixed, apparently.
i don't know if it should be marked as "fixed" now or when lion will be less greedy.
Comment 7 Chia-I Wu 2010-12-02 22:30:43 UTC
I am marking this bug fixed.

I did make a commit to change when vertices are transformed.  It should improve the performance of the lion demo.  The CPU usage might still be high, but the frame rate should increase.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.