Skip to contentSkip to conversation

New: X busyloops when huge image in firefox

Bug 15845 [email protected] 1 participant 9 messages May 6, 2008 – May 24, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

http://bugs.freedesktop.org/show_bug.cgi?id=15845

Summary: X busyloops when huge image in firefox
Product: xorg
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]

Created an attachment (id=16388)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16388)
Xorg log

When a huge image, e.g. 1500x3000 pixels, is shown in Firefox, any rendering action related to that image freezes firefox for 5-10 minutes. During that time X is eating all CPU, spending 30% in user space and 70% in kernel due to GetTimeInMillis().

Xorg-server xorg-server-1.3.99.0-1538-gefa65a0 xf86-video-nouveau ae574ec7d930d8708e4dd9d1d47558666019afe5 DRM kernel modules drm-2.3.0-1229-g43b224f
All of them around 5.5.2008.

nouveau.ko is patched to make AGP init fail, since DFS is broken for me.

To me DRM and Xorg logs show nothing out of the ordinary.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

--- Comment #1 from Pekka Paalanen <[email protected]> 2008-05-06 11:04:47 PST --- Created an attachment (id=16389)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16389)
kernel log with debug=1

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

--- Comment #2 from Pekka Paalanen <[email protected]> 2008-05-06 11:16:44 PST --- Created an attachment (id=16390)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16390)
gdb session

This is a gdb session recorded on a serial console.
For many times I interrupt X while it is spinning and print the backtrace. There's a disassembly of nouveau_notifier_wait_status.
I set breakpoints to NVUploadToScreen and NVDownloadFromScreen to see what kind of calls they get.

Looks like it is migrating a big pixmap a lot. w=1703, h=3000 are probably the original dimensions of the image I used to trigger the problem this time. During the dozens of calls to NVUploadToScreen, the firefox window does not show any redrawing. After something like 5 mins running, the window updates instantly, and I can re-trigger the freeze by doing anything that would expose a piece of the huge image.

Hmm, I just noticed a pattern there:
NVUploadToScreen (pDst=0x2ba0cf4db010, x=0, y=0, w=1703, h=3000 NVUploadToScreen (pDst=0x1314020, x=0, y=0, w=494, h=1315 NVUploadToScreen (pDst=0x2ba0cf4db010, x=0, y=0, w=1703, h=3000 NVUploadToScreen (pDst=0x1314020, x=0, y=0, w=495, h=1315 NVUploadToScreen (pDst=0x2ba0cf4db010, x=0, y=0, w=1703, h=3000 NVUploadToScreen (pDst=0x1314020, x=0, y=0, w=496, h=1315 NVUploadToScreen (pDst=0x2ba0cf4db010, x=0, y=0, w=1703, h=3000 NVUploadToScreen (pDst=0x1314020, x=0, y=0, w=497, h=1315 See the width of the second pixmap.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

--- Comment #3 from Pekka Paalanen <[email protected]> 2008-05-06 11:28:10 PST --- Created an attachment (id=16391)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16391)
xorg.conf

MigrationHeuristic was not set in my xorg.conf. Setting it to "greedy" seems to make the problem go away.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

Pekka Paalanen <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #16391|application/octet-stream    |text/plain
          mime type|                            |
Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

Pekka Paalanen <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #16388|0                           |1

is obsolete| |

--- Comment #4 from Pekka Paalanen <[email protected]> 2008-05-06 13:19:04 PST --- Created an attachment (id=16393)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16393)
X org log EXA fallback instrumentation

Includes additional instrumentation for CheckTexture and CheckBuffer.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

--- Comment #5 from Michel Dänzer <[email protected]> 2008-05-07 02:48:59 PST --- Created an attachment (id=16408)
--> (http://bugs.freedesktop.org/attachment.cgi?id=16408)
Only migrate in source pixmap region needed for CopyNtoN

Does this xserver patch help?

Option "EXAOptimizeMigration" might help in addition.

Signature · 7 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#8 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

--- Comment #6 from Pekka Paalanen <[email protected]> 2008-05-07 12:02:16 PST --- Michel, I applied your patch, and it indeed makes the freeze period drop from 5 minutes to just less than 1 minute. Then, adding EXAOptimizeMigration makes the freezing go away, I don't have to wait for it to unfreeze anymore.

There were some comments on #nouveau that the braindead invocations of NVUploadToScreen might be a Firefox 2 feature.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#9 lore raw

[Bug 15845] X busyloops when huge image in firefox

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=15845

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Michel Dänzer <[email protected]> 2008-05-24 11:15:01 PST --- commit 3baf3b42e079b4e7b61c1e20df305db0724d21f8

Author: Michel Dänzer <[email protected]>
Date:   Sat May 24 20:01:21 2008 +0200

EXA: Specify region used for source pixmap migration in exaCopyNtoN.

Avoids excessive migration overhead in some pathological cases.

Signature · 7 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau