Bug 485892 - Extreme Tuxracer slow on r200/r300
Extreme Tuxracer slow on r200/r300
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-ati (Show other bugs)
12
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Dave Airlie
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-17 04:47 EST by Arkadi Shishlov
Modified: 2018-04-11 05:58 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-27 08:39:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
DRM debug dmesg (119.75 KB, text/plain)
2009-02-21 04:14 EST, Arkadi Shishlov
no flags Details

  None (edit)
Description Arkadi Shishlov 2009-02-17 04:47:30 EST
Extreme Tuxracer game is very slow - ~4FPS 800x600 on Radeon 8500, Athlon XP 3200+, 1.5gb RAM. All updates from rawhide. Kernel 2.6.29-0.119.rc5.fc11.i586. DRI is enabled. glxgears - ~1500FPS, which is fine.
Oprofile shows that most of the time is spent in kernel copy_from_user(). The stats are after ~10sec of level loading and ~30sec of playing:

CPU: Athlon, speed 2210.43 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Cycles outside of halt state) with a unit mask of 0x00 (No unit mask) count 220000
samples  %        image name               symbol name
177952   75.8072  vmlinux                  copy_from_user
4301      1.8322  radeon                   /radeon
4090      1.7423  libGLU.so.1.3.070300     gluBuild2DMipmapLevelsCore
2464      1.0497  libdricore.so            _tnl_draw_prims
1935      0.8243  r200_dri.so              r200EmitState

Oprofile callgraphs feature reports every function being a caller of itself, so no callgraphs.
xorg.conf:

Section "Device"
 Identifier "Videocard0"
 Driver "radeon"
#Option "AccelMethod" "EXA" # now the default
#Option "AccelMethod" "XAA"
#Option "MigrationHeuristic" "greedy"
 Option "AccelDFS" "on"
#Option "FBTexPercent" "10"
 Option "EnablePageFlip" "true"
 Option "GARTSize" "32"
EndSection

Changing radeon driver options and starting kernel with nopat parameter makes no difference.
2D performance and compositing performance (OpenGL and XRender) seems adequate.
Comment 2 Arkadi Shishlov 2009-02-17 17:57:16 EST
Sauerbraten FPS works very well on the same box: ~30fps 1280x1024 full details, ~20fps with water effects. Noticably better than it was a year ago.
Comment 3 Arkadi Shishlov 2009-02-20 15:46:01 EST
I interrupted etracer with KGDB several times and its always same stack trace:

<kgdb stack>
#14 0xc053746e in copy_from_user (to=0xf8d4a5c4, from=0x9d5237c4, n=65536) at arch/x86/lib/usercopy_32.c:789
#15 0xf847c212 in radeon_cp_texture ()
#16 0xf8363638 in drm_ioctl ()
#17 0xc04ac8c6 in vfs_ioctl (filp=<value optimized out>, cmd=<value optimized out>, arg=<value optimized out>) at fs/ioctl.c:51
#18 0xc04ace64 in do_vfs_ioctl (filp=0xec0a3800, fd=<value optimized out>, cmd=0, arg=3218305220) at fs/ioctl.c:539
#19 0xc04acee3 in sys_ioctl (fd=5, cmd=3222824014, arg=3218305220) at fs/ioctl.c:559
#20 <signal handler called>
Comment 4 Arkadi Shishlov 2009-02-21 04:14:05 EST
Created attachment 332795 [details]
DRM debug dmesg

DRM debug was enabled for 1 sec when etracer is rendering static picture - in-game menu is invoked.
Comment 5 Arkadi Shishlov 2009-02-21 14:57:31 EST
Probably should be re-assigned to Mesa or extremetuxracer because ppracer 0.5alpha (built from sources) runs at 45FPS at 1280x1024.
I interrupted etracer several times in GDB and it always in
r200ValidateState->r200UpdateTextureState->r200UpdateTextureUnit->enable_tex_2d->r200UploadTexImages->uploadSubImage

(gdb) bt
#0  __kernel_vsyscall () at arch/x86/vdso/vdso32/int80.S:16
#1  0x0085abc9 in ioctl () from /lib/libc.so.6
#2  0x0066a7ad in drmIoctl () from /usr/lib/libdrm.so.2
#3  0x0066aa9b in drmCommandWriteRead () from /usr/lib/libdrm.so.2
#4  0x00d150c8 in uploadSubImage (face=<value optimized out>, height=<value optimized out>, width=<value optimized out>, hwlevel=<value optimized out>, t=<value optimized out>, rmesa=<value optimized out>) at r200_texmem.c:427
#5  r200UploadTexImages (rmesa=0x83773d0, t=0x9d6d7c0, face=0) at r200_texmem.c:516
#6  0x00d16bc3 in enable_tex_2d () at r200_texstate.c:1597
#7  r200UpdateTextureUnit (ctx=<value optimized out>, unit=<value optimized out>) at r200_texstate.c:1789
#8  0x00d1730e in r200UpdateTextureState (ctx=0x83913d0) at r200_texstate.c:1835
#9  0x00d0d4f4 in r200ValidateState (ctx=0x83913d0) at r200_state.c:2488
#10 0x00d0da84 in r200WrapRunPipeline (ctx=0x83913d0) at r200_state.c:2581
#11 0x0109da6b in _tnl_draw_prims (ctx=0x83913d0, arrays=0x83dd1b8, prim=0x83dbd14, nr_prims=1, ib=0x0, min_index=0, max_index=3) at tnl/t_draw.c:402
#12 0x01095c72 in vbo_exec_vtx_flush (exec=0x83dbbf0) at vbo/vbo_exec_draw.c:251
#13 0x01091d08 in vbo_exec_FlushVertices (ctx=0x83913d0, flags=1) at vbo/vbo_exec_api.c:751
#14 0x01008777 in _mesa_PopAttrib () at main/attrib.c:862
#15 0x080c3e03 in pp::Font::draw (this=0x8a461b0, string=0x82d420c, x=738, y=52) at ppgltk/font.cpp:99
#16 0x0807ec8c in HUD::speed (this=0x82d3e40, i=9, speed=5.0399999141693108) at hud.cpp:257
#17 0x0807fc58 in HUD::draw (this=0x82d3e40, plyr=@0x82d62c0) at hud.cpp:108
#18 0x0809e744 in Racing::loop (this=0x96d11e0, timeStep=0.210999995) at racing.cpp:399
#19 0x0808236a in main_loop () at loop.cpp:178
#20 0x080aa21d in winsys_process_events () at winsys.cpp:304
#21 0x08082ca2 in main (argc=-434929664, argv=0xbffff7e4) at main.cpp:307
(gdb) 

(gdb) bt
#0  __kernel_vsyscall () at arch/x86/vdso/vdso32/int80.S:16
#1  0x0085abc9 in ioctl () from /lib/libc.so.6
#2  0x0066a7ad in drmIoctl () from /usr/lib/libdrm.so.2
#3  0x0066aa9b in drmCommandWriteRead () from /usr/lib/libdrm.so.2
#4  0x00d150c8 in uploadSubImage (face=<value optimized out>, height=<value optimized out>, width=<value optimized out>, hwlevel=<value optimized out>, t=<value optimized out>, rmesa=<value optimized out>) at r200_texmem.c:427
#5  r200UploadTexImages (rmesa=0x83773d0, t=0x91cbe10, face=0) at r200_texmem.c:516
#6  0x00d16bc3 in enable_tex_2d () at r200_texstate.c:1597
#7  r200UpdateTextureUnit (ctx=<value optimized out>, unit=<value optimized out>) at r200_texstate.c:1789
#8  0x00d1730e in r200UpdateTextureState (ctx=0x83913d0) at r200_texstate.c:1835
#9  0x00d0d4f4 in r200ValidateState (ctx=0x83913d0) at r200_state.c:2488
#10 0x00d0da84 in r200WrapRunPipeline (ctx=0x83913d0) at r200_state.c:2581
#11 0x0109da6b in _tnl_draw_prims (ctx=0x83913d0, arrays=0x83dd1b8, prim=0x83dbd14, nr_prims=1, ib=0x0, min_index=0, max_index=3) at tnl/t_draw.c:402
#12 0x01095c72 in vbo_exec_vtx_flush (exec=0x83dbbf0) at vbo/vbo_exec_draw.c:251
#13 0x01091d08 in vbo_exec_FlushVertices (ctx=0x83913d0, flags=1) at vbo/vbo_exec_api.c:751
#14 0x0107b2ad in _mesa_BindTexture (target=3553, texName=101) at main/texobj.c:954
#15 0x080664c0 in draw_sky (pos={x = 53.791352400575953, y = -292.63757008213372, z = -627.25245198610651}) at course_render.cpp:348
#16 0x0809e62c in Racing::loop (this=0x96d11e0, timeStep=0.209999993) at racing.cpp:375
#17 0x0808236a in main_loop () at loop.cpp:178
#18 0x080aa21d in winsys_process_events () at winsys.cpp:304
#19 0x08082ca2 in main (argc=-498974720, argv=0xbffff7e4) at main.cpp:307
(gdb) 

(gdb) bt
#0  __kernel_vsyscall () at arch/x86/vdso/vdso32/int80.S:16
#1  0x0085abc9 in ioctl () from /lib/libc.so.6
#2  0x0066a7ad in drmIoctl () from /usr/lib/libdrm.so.2
#3  0x0066aa9b in drmCommandWriteRead () from /usr/lib/libdrm.so.2
#4  0x00d150c8 in uploadSubImage (face=<value optimized out>, height=<value optimized out>, width=<value optimized out>, hwlevel=<value optimized out>, t=<value optimized out>, rmesa=<value optimized out>) at r200_texmem.c:427
#5  r200UploadTexImages (rmesa=0x83773d0, t=0x9d6b350, face=0) at r200_texmem.c:516
#6  0x00d16bc3 in enable_tex_2d () at r200_texstate.c:1597
#7  r200UpdateTextureUnit (ctx=<value optimized out>, unit=<value optimized out>) at r200_texstate.c:1789
#8  0x00d1730e in r200UpdateTextureState (ctx=0x83913d0) at r200_texstate.c:1835
#9  0x00d0d4f4 in r200ValidateState (ctx=0x83913d0) at r200_state.c:2488
#10 0x00d0da84 in r200WrapRunPipeline (ctx=0x83913d0) at r200_state.c:2581
#11 0x0109da6b in _tnl_draw_prims (ctx=0x83913d0, arrays=0x83dd1b8, prim=0x83dbd14, nr_prims=1, ib=0x0, min_index=0, max_index=3) at tnl/t_draw.c:402
#12 0x01095c72 in vbo_exec_vtx_flush (exec=0x83dbbf0) at vbo/vbo_exec_draw.c:251
#13 0x01091d08 in vbo_exec_FlushVertices (ctx=0x83913d0, flags=1) at vbo/vbo_exec_api.c:751
#14 0x01058ad5 in _mesa_Translatef (x=17.125, y=0, z=0) at main/matrix.c:446
#15 0x080c8e80 in FTTextureGlyph::Render (this=0x9d5aa98, pen=@0xbffff170) at ppgltk/FT/FTTextureGlyph.cpp:66
#16 0x080c82bf in FTGlyphContainer::Render (this=0x8a1e150, characterCode=48, nextCharacterCode=49, penPosition={values = {17.125, 0, 0}}) at ppgltk/FT/FTGlyphContainer.cpp:86
#17 0x080c6a88 in FTFont::Render (this=0x8812948, string=0x82d3f34) at ppgltk/FT/FTFont.cpp:270
#18 0x080c7154 in FTGLTextureFont::Render (this=0x8812948, string=0x82d3f34) at ppgltk/FT/FTGLTextureFont.cpp:178
#19 0x080c3e03 in pp::Font::draw (this=0x8a08bb8, string=0x82d3f34, x=737, y=547) at ppgltk/font.cpp:99
#20 0x0807eda4 in HUD::herring (this=0x82d3e40, i=2, herring_count=1) at hud.cpp:180
#21 0x0807fcd6 in HUD::draw (this=0x82d3e40, plyr=@0x82d62c0) at hud.cpp:97
#22 0x0809e744 in Racing::loop (this=0x96d11e0, timeStep=0.209999993) at racing.cpp:399
#23 0x0808236a in main_loop () at loop.cpp:178
#24 0x080aa21d in winsys_process_events () at winsys.cpp:304
#25 0x08082ca2 in main (argc=-445255680, argv=0xbffff7e4) at main.cpp:307
(gdb)
Comment 6 Arkadi Shishlov 2009-02-23 12:55:16 EST
Same slowness on r300 (tested on RV350).
Comment 7 Bug Zapper 2009-06-09 07:26:53 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Matěj Cepl 2009-11-05 13:22:00 EST
Since this bugzilla report was filed, there have been several major updates in various components of the Xorg system, which may have resolved this issue. Users who have experienced this problem are encouraged to upgrade their system to the latest version of their packages. For packages from updates-testing repository you can use command

yum upgrade --enablerepo='*-updates-testing'

Alternatively, you can also try to test whether this bug is reproducible with the upcoming Fedora 12 distribution by downloading LiveMedia of F12 Beta available at http://alt.fedoraproject.org/pub/alt/nightly-composes/ . By using that you get all the latest packages without need to install anything on your computer. For more information on using LiveMedia take a look at https://fedoraproject.org/wiki/FedoraLiveCD .

Please, if you experience this problem on the up-to-date system, let us now in the comment for this bug, or whether the upgraded system works for you.

If you won't be able to reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.

[This is a bulk message for all open Fedora Rawhide Xorg-related bugs. I'm adding myself to the CC list for each bug, so I'll see any comments you make after this and do my best to make sure every issue gets proper attention.]
Comment 9 Arkadi Shishlov 2009-11-10 17:46:10 EST
Same slowness on fully up to date Fedora 11 system on RV350 with
kernel-2.6.30.9-96.fc11
xorg-x11-drv-ati-6.12.2-14.fc11
mesa-libGL-7.6-0.1.fc11
KMS disabled.
PPRacer is 30+ FPS, ETRacer is only 5 FPS and occasional skybox flickering.
Comment 10 Arkadi Shishlov 2009-11-11 14:17:08 EST
With KMS enabled, PPRacer performance drops to 10 FPS, but ETRacer is faster at 15 FPS.
Comment 11 Arkadi Shishlov 2010-02-27 08:39:17 EST
With up-to-date Fedora 12, KMS enabled and following software

kernel-2.6.31.12-174.2.22.fc12.i686
xorg-x11-drv-ati-6.13.0-0.20.20091221git4b05c47ac.fc12.i686
mesa-libGL-7.7-3.fc12.i686

the performance of both ETRacer and PPRaces on RV350 is satisfactory.
ETRacer 20FPS+, PPRacer 25-30FPS at 1280x800 "Doing" map.

Note You need to log in before you can comment on or make changes to this bug.