Bug 102983 - [SKL][regression][bisected] Performance regression after linux 4.7
Summary: [SKL][regression][bisected] Performance regression after linux 4.7
Status: CLOSED INVALID
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: highest major
Assignee: Daniel Vetter
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2017-09-25 20:13 UTC by Ross Vandegrift
Modified: 2018-01-04 20:17 UTC (History)
4 users (show)

See Also:
i915 platform: SKL
i915 features: display/Other


Attachments
log from bisection (2.64 KB, text/plain)
2017-09-25 20:13 UTC, Ross Vandegrift
no flags Details
dmesg w/drm.debug=0xe from linux 4.7.8 (120.52 KB, text/plain)
2017-09-25 20:13 UTC, Ross Vandegrift
no flags Details
dmesg w/drm.debug=0xe from drm-tip (6aa0df37d3fc) (125.58 KB, text/plain)
2017-09-25 20:15 UTC, Ross Vandegrift
no flags Details
high priority flipping (513 bytes, patch)
2017-11-07 12:05 UTC, Daniel Vetter
no flags Details | Splinter Review

Description Ross Vandegrift 2017-09-25 20:13:16 UTC
Created attachment 134473 [details]
log from bisection

In Linux 4.7 and earlier, RimWorld (a steam game) ran at 60fps on my laptop.  With any later kernel release, the game runs at 30-40fps, stutters, and has severe input latency.  The issue is 100% reproducible.  drm-tip (6aa0df37d3fc) exhibits the same issue.


Hardware info: Skylake i7-6700HQ, Dell XP 9550.  The laptop also has an nvidia gpu.  The issue affects both gpus, but testing purposes, I've only used the intel gpu.

Software info: Debian stretch, x86_64

Bisection details:  good commit v4.7, bad commit v4.8-rc1.  This leads to a DRM commit:

a59c2086fe9c489e0a2a86e080ba is the first bad commit
commit ea0000f0d369a59c2086fe9c489e0a2a86e080ba
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Jun 13 16:13:46 2016 +0200

    drm/i915: Roll out the helper nonblock tracking

    Right now still all blocking, no worker anywhere to be seen.

    Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/1465827229-1704-2-git-send-email-daniel.vetter@ffwll.ch

To be attached:
- git bisect log
- dmesg w/ drm.debug=0xe from 4.7.8
- dmesg w/ drm.debug=0xe from drm-tip
Comment 1 Ross Vandegrift 2017-09-25 20:13:55 UTC
Created attachment 134474 [details]
dmesg w/drm.debug=0xe from linux 4.7.8
Comment 2 Ross Vandegrift 2017-09-25 20:15:20 UTC
Created attachment 134475 [details]
dmesg w/drm.debug=0xe from drm-tip (6aa0df37d3fc)
Comment 3 Chris Wilson 2017-09-25 20:18:02 UTC
Rimworld is being run fullscreen? What compositor setup are you using? Have you tried disabled the compositor or setting a "disable unredirect when fullscreen" flag?
Comment 4 Ross Vandegrift 2017-09-25 20:56:11 UTC
Yes, fullscreen.

I use Enlightenement with its integrated compositor in OpenGL mode.  Normally, compositing for fullscreen windows is enabled.

On drm-tip: disabling compositing fullscreen windows makes the issue worse.  Max fps is 30.

On Linux 4.7: the setting makes no detectable difference.
Comment 5 Daniel Vetter 2017-11-07 11:35:26 UTC
Bunch of things:

- Please quote the full drm-tip top commit (git show), drm-tip is rebasing and the sha1 you quoted is long gone.

- The input lag plus lower framerate sounds like we're starving the atomic flip thread. I'll try to work out a patch to give that rt priority, just for testing.
Comment 6 Daniel Vetter 2017-11-07 12:05:06 UTC
Created attachment 135282 [details] [review]
high priority flipping

Please test. Should apply on any recent-ish drm-tip.
Comment 7 Ross Vandegrift 2017-11-07 19:47:46 UTC
I tested with this patch against current drm-tip, the problem is unaffected.

ross@stgulik:~/src/linux/linux$ git show
commit b4a2ab198d763c26f8dc3dc7651792fda84c8b37
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Tue Nov 7 17:51:16 2017 +0200

    drm-tip: 2017y-11m-07d-15h-50m-22s UTC integration manifest

diff --git a/integration-manifest b/integration-manifest
new file mode 100644
index 000000000000..0cb859884036
--- /dev/null
+++ b/integration-manifest
@@ -0,0 +1,28 @@
+drm-upstream drm-fixes 9cc06965fc8b7c5592b6a1355dff2623611bfeb3
+       Merge branch 'drm-fixes-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
+drm-misc drm-misc-fixes 62676d10b483a2ff6e8b08c5e7c7d63a831343f5
+       qxl: alloc & use shadow for dumb buffers
+drm-intel drm-intel-fixes bb5cf3386327c9cb5ca3fbb85242e940751649c8
+       drm/i915: Check incoming alignment for unfenced buffers (on i915gm)
+drm-amd drm-amd-fixes 2b702e72e33bbdec0764cfb6e1dd00fe1142ae55
+       Merge tag 'drm-misc-fixes-2017-09-28-1' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
+drm-upstream drm-next 8a6fb5b5823d863b07f670dc9e791d4622d5b7e9
+       Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
+drm-misc drm-misc-next-fixes 30cfcf01665f3c8d8dc3ebb3dfb1a8248f53404a
+       drm/rockchip: add CONFIG_OF dependency for lvds
+drm-intel drm-intel-next-fixes 8a6fb5b5823d863b07f670dc9e791d4622d5b7e9
+       Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
+drm-amd drm-amd-next-fixes 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e
+       Linux 4.14-rc1
+drm-misc drm-misc-next 79436a1c9bccf5e38cb6ea26e4e4b9283baf2e20
+       drm/edid: make drm_edid_to_eld() static
+drm-intel drm-intel-next-queued 5684514ba9dc6d7aa932cc53d97d866b2386221f
+       drm/i915: Deconstruct struct sgt_dma initialiser
+drm-amd drm-amd-next 754270c7c56292e97d0eff924a5d5d83f92add07
+       Merge branch 'drm-next-4.15' of git://people.freedesktop.org/~agd5f/linux into drm-next
+sound-upstream for-linus 132d358b183ac6ad8b3fea32ad5e0663456d18d1
+       ALSA: seq: Fix OSS sysex delivery in OSS emulation
+sound-upstream for-next 3f1185d6c9d3fe91aa85ec8d3f4d71207452c458
+       ALSA: fix kernel-doc build warning
+drm-intel topic/core-for-CI 6fdcd04508c92fd588a30cc3a1c9e2c9be451230
+       e1000e: fix buffer overrun while the I219 is processing DMA transactions
Comment 8 Eero Tamminen 2017-11-22 11:49:29 UTC
Are you seeing this regression with anything else than the latest beta release of Rimworld:
http://store.steampowered.com/app/294100/RimWorld/
?


Do you have, or could you provide Apitrace trace of the game?

(On Debian/Ubuntu: "sudo apt-get install apitrace", add "apitrace trace" to front of the game command line in Steam options, locate the *.trace file from Game's steam directory after tracing and add it here or provide link to it. Note that trace files sizes can be in GBs.)


Do you see the perf regression also with the apitrace trace?

("apitrace replay <game>.trace", trace replay has a lot of additional overheads, so you cannot compare its perf to real game.)
Comment 9 Ross Vandegrift 2017-12-24 19:35:50 UTC
I tested again with the latest RimWorld release (beta 18), and the regression is gone.  Since I can't reproduce, I'll mark resolved.


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.