Bug 93254

Summary: [NVA5] The Long Dark (game) is very slow because of "kernel rejected pushbuf" messages in log files
Product: Mesa Reporter: Alexander Schlarb <alexander-fd>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED MOVED QA Contact: Nouveau Project <nouveau>
Severity: normal    
Priority: medium CC: frederic.romagne
Version: 11.0   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: First "kernel rejected pushbuf" error in log file
Complete log file (compressed)
Kernel log
X11 Server log

Description Alexander Schlarb 2015-12-04 21:48:43 UTC
Created attachment 120358 [details]
First "kernel rejected pushbuf" error in log file

Kernel: Linux 4.3 (snapshot from 2015-11-04)
Mesa: 11.0.2
nouveau X11 driver: 1.0.11
Platform: Sony VPCF12S1E with NVidiaGT216M (GForce GT 330M)
System: Debian testing based

Starting the game works fine (although it is somewhat slower than with NVidia's driver), but once you launch the actual game Unity starts logging up to 1GB/min worth of "kernel rejected pushbuf" logs into the "~/.config/unity3d/Hinterland/The Long Dark/Player.log" log file. Making that file (and it's containing directory) read-only I could verify that the game runs at acceptable frame rates and without noticeable glitches most of the time. Sometimes however, some textures disappear and it hangs for several seconds before resuming.

Steps to reproduce:

 1) Purchase and download "The Long Dark" from Steam[1]
 2) Navigate to "~/.local/share/Steam/steamapps/common/TheLongDark" (on the console or a file browser)
 3) Launch the "tld.x86_64" file[2]
 4) Press any key to move past the disclaimer screen
 5) Select "Sandbox" from the main menu[3]
 6) Start a "New" game or "Continue" a previous survival trip
 7) Wait for the actual game to load
 8) Observe extreme slowness while the disk I/O is a 100%

"Step 8" does not happen with NVidia binary drivers and the game is quite playable.

See "Player.log.head" for first "kernel rejected pushbuf" error.
The corresponding `dmesg` message is:

    nouveau 0000:01:00.0: tld.x86_64[28285]: nv50cal_space: -16

If you tell me what to do for debugging this, I'll definitely help as much as I can in fixing this issue!
(Including kernel patches, traces, etc.)

Notes:
 1. I'm willing to donate a copy of the game to one established Nouveau contributor
 2. The game cannot be launched from Steam when using recent versions of Open source drivers due to https://github.com/ValveSoftware/steam-runtime/issues/34
 3. Due to the game being alpha right now the "Story"-mode has not been released yet – this shouldn't matter however
Comment 1 Alexander Schlarb 2015-12-04 21:50:39 UTC
Created attachment 120359 [details]
Complete log file (compressed)
Comment 2 Alexander Schlarb 2015-12-04 22:01:15 UTC
Created attachment 120360 [details]
Kernel log
Comment 3 Alexander Schlarb 2015-12-04 22:04:47 UTC
Created attachment 120361 [details]
X11 Server log
Comment 4 Ilia Mirkin 2015-12-04 22:06:20 UTC
Interesting... so this may actually be a legit situation of "gpu not processing pushbufs fast enough" and we run out of IB space. For some reason each pushbuf has a very small quantity of commands... oh, I see. It's just a ton of small-ish indexed draws, each of which ends up going through nouveau_pushbuf_data() which in turn causes a new IB slot to be used up.

We need to have some way to figure out how many IB slots are open... or throttle pushbuf submission or... something.
Comment 5 Alexander Schlarb 2015-12-17 15:10:03 UTC
Anything I can do about this?
Comment 6 GitLab Migration User 2019-09-18 20:41:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1093.

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.