Bug 27698

Summary: [bisected] 3D performance regressed 60% on drm-intel-next
Product: DRI Reporter: zhao jian <jian.j.zhao>
Component: DRM/IntelAssignee: Carl Worth <cworth>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: high CC: eric
Version: XOrg git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
xorg.0.log none

Description zhao jian 2010-04-16 08:22:28 UTC
Created attachment 35095 [details]
xorg.0.log

System Environment:
--------------------------
Platform: G45
Libdrm:         (master)3506173ba7e726a9d0a17ec42734a925a885b01e
Mesa:           (master)53c57191c5f24d3620e2e4ce95dd12b5c6e9109b
Xserver:                (master)e424d5812300e82de375d83dc0b490a76d865016
Xf86_video_intel:       (master)c374c94e41d6e7d677334171e3255778d77cbe18
Kernel: (drm-intel-next)7f8a85698f5c8a981641ec0bdf9926768786db9d

Bug detailed description:
-------------------------
With the newest code on drm-intel-next, 3D demo openarena and ut2004's performance regressed 60% on G45 platform. With commit a0425110cce71813a06682e9630266bafc0a969d openarena is 54 fps, and with 7f8a85698f5c8a981641ec0bdf9926768786db9d it is only 19 fps. And I will bisect it later. 

Reproduce steps:
--------------------
1. xinit&
2. openarena exec stress_bases3
Comment 1 Gordon Jin 2010-04-16 20:55:39 UTC
CCing Eric to see if he has idea which commit might regress.
Comment 2 zhao jian 2010-04-19 02:42:13 UTC
We bisect out that it was caused by the commit cfecde435dda78248d6fcdc424bed68d5db6be0b in srm-intel-next. 

commit cfecde435dda78248d6fcdc424bed68d5db6be0b
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Apr 8 23:31:57 2010 -0700

    drm/i915: Don't enable pipe/plane/VCO early (wait for DPMS on).

    The existing code handling the DPMS ON event is much more careful to
    ensure that these registers are enabled according to strict sequencing
    requirements. Enabling these early in mode_set simply defeats that.

    Signed-off-by: Carl Worth <cworth@cworth.org>
    Signed-off-by: Eric Anholt <eric@anholt.net>
Comment 3 Jesse Barnes 2010-04-19 18:27:56 UTC
It seems like the only way this commit could affect 3D performance would be by affecting vblank interrupt frequency.  Can you check the vblank interrupt frequency before and after this patch?  If it's the same, I would expect this bisect is just happening to fail, maybe due to some other latent issue.
Comment 4 zhao jian 2010-04-19 20:08:50 UTC
(In reply to comment #3)
> It seems like the only way this commit could affect 3D performance would be by
> affecting vblank interrupt frequency.  Can you check the vblank interrupt
> frequency before and after this patch?  If it's the same, I would expect this
> bisect is just happening to fail, maybe due to some other latent issue.

Yes, Jesse, you are right. It really affect the vblank interrupt frequency. I used with the kernel before this commit, I can get about 75 vblank interrupts, and if I change to the culprit commit, I can only get 40 vblank interrupts. 

The command I use is: cat /proc/interrupts | grep i915 > interrupt_before_good(bad) ; sleep 1; cat /proc/interrupts | grep i915 > interrupt_after_good(bad)

And I also notice the absolute amount of the vblank interrupt differs a lot between these two kernels. With the commit cfecde435dda78248d6fcdc424bed68d5db6be0b, after I run openarena, it can only receive 15 vblank interrupts per second. And with commit ea059a1ec4496a10f94ca9d0c1b530faf1b85dce,  after I run openarena, it will receive 60 interrupts per second. 

with kernel commit ea059a1ec4496a10f94ca9d0c1b530faf1b85dce:
[root@x-g45c ~]# cat interrupt_before_good
            CPU0       CPU1       CPU2       CPU3
  28:       1498       1655       1213        905   PCI-MSI-edge      i915
[root@x-g45c ~]# cat interrupt_after_good
  28:       1522       1674       1232        918   PCI-MSI-edge      i915

with kernel cfecde435dda78248d6fcdc424bed68d5db6be0b:
[root@x-g45c ~]# cat interrupt_before_bad
  28:        132        184         43         56   PCI-MSI-edge      i915
[root@x-g45c ~]# cat interrupt_after_bad
  28:        151        192         43         69   PCI-MSI-edge      i915
Comment 5 Carl Worth 2010-04-27 10:57:29 UTC
Thanks for the bug report.

I've recommended reverting the bisected commit.

-Carl
Comment 6 Gordon Jin 2010-05-24 18:34:55 UTC
Removing out of Q2 release, since Q2 release won't use this code.
Comment 7 Gordon Jin 2010-06-27 22:52:24 UTC
Patch reverted. Closing.
Comment 8 zhao jian 2010-07-05 00:19:53 UTC
It has been reverted in linux-2.6 master branch, but it is still not reverted in drm-intel-next branch.
Comment 9 wang,jinjin 2010-08-05 22:40:12 UTC
Verify detailed description:
-------------------------
With the newest code((drm-intel-next)7b824ec2e5d7d086264ecae51e30e3c5e00cdecc) on drm-intel-next, 3D demo openarena 's performance goes up to about 60fps. 
By contrast, with the bug code before(
(drm-intel-next)7f8a85698f5c8a981641ec0bdf9926768786db9d), its  performance goes
down to about 18fps.

Kernel detailed:
-------------------------
Kernel: (drm-intel-next)7b824ec2e5d7d086264ecae51e30e3c5e00cdecc
Some additional commit info:
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Jul 26 14:49:07 2010 -0700

Kernel: (drm-intel-next)7f8a85698f5c8a981641ec0bdf9926768786db9d
Some additional commit info:
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date:   Thu Apr 1 13:07:53 2010 +0800
Comment 10 Jari Tahvanainen 2016-12-07 16:14:49 UTC
Closing very 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.