Bug 20761

Summary: [KMS] x11perf has a low performance
Product: DRI Reporter: zhao jian <jian.j.zhao>
Component: DRM/IntelAssignee: Jesse Barnes <jbarnes>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium CC: gordon.jin, yan.i.li
Version: XOrg git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 20276    
Attachments:
Description Flags
xorg.0.log
none
xorg.conf
none
use GTT maps in KMS mode
none
Use all fence regs none

Description zhao jian 2009-03-20 01:25:31 UTC
Created attachment 24069 [details]
xorg.0.log

System environment:
----------------------
Libdrm:         (master)391c92ae1799f0d1fddb2321c5713afc58575514
Mesa:   (mesa_7_4_branch)463ac421a53c769922f174b3a07f7014f64b3234               
Xserver:        (server-1.6-branch)f469726fec502ce29999eda6919c3c3d26c127d8
Xf86_video_intel:              
(master)73aa23d9150121a4e4b70a78cab910acd164abf5
Kernel:       (for-airlied)edde72a59461d766997b469f6d20afdf5fe9b5b4

Bug detailed description:
--------------------------
Start with the KMS kernel, then startx with uxa, run 2D benchmark of aa10text and rgb10text, both of them will have a very bad performance, its performance was approximately only 1/6 ~ 1/5 of using UXA with non-KMS kernel. 

reproduce steps:
---------------------
1.xinit&(with uxa)
2.x11perf -aa10text (x11perf -rgb10text)
Comment 1 zhao jian 2009-03-20 01:26:06 UTC
Created attachment 24070 [details]
xorg.conf
Comment 2 Jesse Barnes 2009-03-24 18:27:36 UTC
Created attachment 24217 [details] [review]
use GTT maps in KMS mode

Can you try this?
Comment 3 zhao jian 2009-03-26 02:42:34 UTC
Jessi, 
It seems that this patch has no effect on its performance with KMS. It is still 88.8k with rgb10text 181k with aa10text. While with non-KMS kernel, 408k with rgb10text , 418k with aa10text. (With your patch a little better 532k with rgb10text, 728k with aa10text.)
Comment 4 Jesse Barnes 2009-03-26 10:27:30 UTC
I think you need the updated patch and libdrm bits I posted in 20803 at the very least, though there may be performance issues beyond that.
Comment 5 zhao jian 2009-03-27 01:35:30 UTC
(In reply to comment #4)
> I think you need the updated patch and libdrm bits I posted in 20803 at the
> very least, though there may be performance issues beyond that.

I used the update update 2D patch and libdrm patch in 20803 with the KMS in UXA mode. But it still has no change. BTW, I tested on 945gm, is your patch fitted ot it? 
Comment 6 zhao jian 2009-04-07 19:58:53 UTC
Its performance under KMS has improved a lot from the former one though still lower than UMS. With KMS, it is 384k with rgb10text 451k with aa10text. With UMS they are correspondingly 512k and 782k. With the following configuration:
Libdrm:             (master)1faab66cfd1a854925da6ff7109aa614292dea90
Mesa:               (mesa_7_4_branch)de197cf991416f0cd65ad2e2d2ca9aa599b52075
Xserver:            (server-1.6-branch)60c161545af80eb78eb790a05bde79409dfdf16e
Xf86_video_intel:   (2.7)3e5586cace98f73a9f8403a6446d380899ecbce9
Kernel:             (drm-intel-2.6.29)71d7aec4bbf923eaf43563c03459726a746cd332


Comment 7 zhao jian 2009-04-10 01:20:05 UTC
Hi Jesse, 
on 945gm-32, KMS+UXA, its performance goes down again. Now is rgb10text 88.2k, aa10text 180k. With UMS+UXA, it is correspondingly 535k and 811k. Maybe relates to the newly checked ins in 2D side in 2.7 branch.
Comment 8 Alberto González 2009-04-11 07:22:30 UTC
Maybe related (or maybe not, but still on 2D performance), have you tried gtkperf with and without KMS? I've tried in 2 computers (945GM and G45 chipsets) with same results. For example, on my desktop with a G45 chipset and X4500HD graphics I get:

EXA: 5.5 seconds
UXA no KMS: 11 seconds
UXA + KMS: I had to ^C after the "GtkDrawingArea - Lines" test was taking more than a minute instead of about 1 second it takes without KMS. The slownes is perfectly visible when drawing the lines as opposed to when not using KMS.
Comment 9 Jesse Barnes 2009-04-13 12:47:45 UTC
This should help a lot:

commit 9b615a52671aacf34666f90ecfff98651ce6afe2
Author: Li Peng <peng.li@intel.com>
Date:   Fri Apr 10 14:39:35 2009 +0800

    Turn on front buffer tiling in KMS.
Comment 10 Jesse Barnes 2009-04-14 11:14:38 UTC
Created attachment 24792 [details] [review]
Use all fence regs

This patch might help pre-965 chips a bit since they need all the fences for rendering.  For 965+ you'll need the kernel patch I posted to intel-gfx today...
Comment 11 zhao jian 2009-04-16 03:43:07 UTC
With the newst codes, on 945gm-32 it works well now. With KMS aa10text is now 817k, rgb10text is 539k. With UMS+ UXA, correspondingly are 820k and 588k. 
What's else, gtperf run under UMS+ UXA is 21.30, whereas with the old code is the same as Alberto González's, that I had to ^C after the "GtkDrawingArea - Lines" test was taking more than a minute instead of about 1 second it takes without KMS.  So I think it is OK now. 
Comment 12 Jesse Barnes 2009-04-16 09:38:14 UTC
Great, closing this out then.  Thanks for confirming.
Comment 13 Jari Tahvanainen 2016-12-07 16:14:18 UTC
Closing really old verified+fixed.

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.