Re: [Intel-gfx] xf86-video-intel memory leakage
On Thursday 12 February 2009 11:23:35 Chris Wilson wrote: Since cairo-perf will cause a leak of a couple of GiB in a few seconds on my i915, I was able to track down the cause pretty quickly. It turns out not to be limited to uxa at all, just uxa exercises the bufmgr much more than exa. The issue appears to be the bufmgr cache handling which appears unbounded. Its use was introduced with: commit a893f176dda0b64f7dadfda6bf0331240037851e Author: Carl Worth cwo...@cworth.org Date: Fri Jul 25 15:56:35 2008 -0700 Add call to intel_bufmgr_gem_enable_reuse So you can try reverting that commit and confirming if that clears the issue for you. Well, I can see some improvement by reverting the above patch. Xorg memory usage increases more slowly (but still increases) and also sudo lsof | grep drm mm object | wc -l reports much smaller numbers. However, I'd like to know whether the two following behaviors can be considered as normal: - when I close all the KDE applications, Xorg memory usage increases (usually by 0.1%). On the machine with ATI card and radeon driver (but kernel 2.6.26), the Xorg memory usage decreases when closing all the KDE applications. - after resuming from suspend, there is some swap memory used. The usage of swap memory increases after every resume. thanks, Stefano ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
On Monday 09 February 2009 20:28:14 Johannes Engel wrote: Jesse Barnes wrote: Interesting, thanks for trying to narrow it down. I don't see anything on re-review that would cause huge increases in the amount of memory used, though the additional alignment we apply in that patch will increase things somewhat, so might make the problem happen faster. Are you using UXA or EXA? You are probably right here, Jesse: Letting Xorg run with UXA on my GM945 turns out to show a similar problem after a couple of hours or similar. sudo lsof | grep drm mm object | wc -l shows the incredible number of 2407... I have a different issue, but I would also call it a memory leakage. I am on GM965 using KDE4 with DRI2. I tried both with debian experimental packages (xserver 1.5.99.901, mesa 7.3, libdrm 2.4.4+git+20090205) and with self- compiled stack from git master as of yesterday. The kernel is from airlied's drm-fixes branch up to commit d2f59357700487a8b944f4fd1e97cf5ea2ed (drm/i915: select framebuffer support automatically). After a fresh boot and login into KDE4, top shows that Xorg uses 2.1% of memory (2 GB). Attached is what xrestop shows (xrestop_2.1_568020k, where 568020k is the total memory usage as shown by top). Then, I launch some applications and, after a couple of hours, close all of them and top shows that Xorg now uses 18.1% of memory. Attached is also what xrestop shows now. It looks like that closing a KDE application does not free memory used by Xorg (as shown by top). Also, switching between applications (especially using composite effects like present windows) causes an increase in the memory usage of Xorg. I have to say that I have another machine with a similar setup (except the kernel which is a 2.6.26 kernel) with an ATI card (using radeon driver) that does not show such behavior. Also, when I resume from a suspend to disk, top shows that some swap memory is used (while before suspending the swap memory was not used), e.g., 791604k. The swap memory used seems to increase after subsequent suspend/resume cycles. If matters, sudo lsof | grep drm mm object | wc -l reports 9944... Any hint how to debug further and provide more information? thanks, Stefano ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
On Thursday 12 February 2009 10:26:14 Stefano Avallone wrote: On Monday 09 February 2009 20:28:14 Johannes Engel wrote: Jesse Barnes wrote: Interesting, thanks for trying to narrow it down. I don't see anything on re-review that would cause huge increases in the amount of memory used, though the additional alignment we apply in that patch will increase things somewhat, so might make the problem happen faster. Are you using UXA or EXA? You are probably right here, Jesse: Letting Xorg run with UXA on my GM945 turns out to show a similar problem after a couple of hours or similar. sudo lsof | grep drm mm object | wc -l shows the incredible number of 2407... I have a different issue, but I would also call it a memory leakage. I am on GM965 using KDE4 with DRI2. I tried both with debian experimental packages (xserver 1.5.99.901, mesa 7.3, libdrm 2.4.4+git+20090205) and with self- compiled stack from git master as of yesterday. The kernel is from airlied's drm-fixes branch up to commit d2f59357700487a8b944f4fd1e97cf5ea2ed (drm/i915: select framebuffer support automatically). After a fresh boot and login into KDE4, top shows that Xorg uses 2.1% of memory (2 GB). Attached is what xrestop shows (xrestop_2.1_568020k, where 568020k is the total memory usage as shown by top). Then, I launch some applications and, after a couple of hours, close all of them and top shows that Xorg now uses 18.1% of memory. Attached is also what xrestop shows now. It looks like that closing a KDE application does not free memory used by Xorg (as shown by top). Also, switching between applications (especially using composite effects like present windows) causes an increase in the memory usage of Xorg. I have to say that I have another machine with a similar setup (except the kernel which is a 2.6.26 kernel) with an ATI card (using radeon driver) that does not show such behavior. Also, when I resume from a suspend to disk, top shows that some swap memory is used (while before suspending the swap memory was not used), e.g., 791604k. The swap memory used seems to increase after subsequent suspend/resume cycles. If matters, sudo lsof | grep drm mm object | wc -l reports 9944... Any hint how to debug further and provide more information? thanks, Stefano forgot the attachments, sorry :-) ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg 0 - Qt-subapplication ( PID: 6862 ): pixmap bytes : 13189150 other bytes : ~10984 total bytes : ~13200134 1 - unknown ( PID: ? ): pixmap bytes : 4096000 other bytes : ~4544 total bytes : ~4100544 2 - KWin ( PID: 6855 ): pixmap bytes : 1933362 other bytes : ~4264 total bytes : ~1937626 3 - Yakuake ( PID: 6900 ): pixmap bytes : 1366934 other bytes : ~2392 total bytes : ~1369326 4 - unknown ( PID: ? ): pixmap bytes : 207920 other bytes : ~6520 total bytes : ~214440 5 - unknown ( PID: ? ): pixmap bytes : 173912 other bytes : ~2056 total bytes : ~175968 6 - klipper ( PID: 6907 ): pixmap bytes : 127720 other bytes : ~1792 total bytes : ~129512 7 - kmix ( PID: 6905 ): pixmap bytes : 109032 other bytes : ~1840 total bytes : ~110872 8 - kwalletmanager ( PID: 6967 ): pixmap bytes : 73528 other bytes : ~1624 total bytes : ~75152 9 - korgac ( PID: 6911 ): pixmap bytes : 30384 other bytes
Re: [Intel-gfx] xf86-video-intel memory leakage
On Thu, 2009-02-12 at 10:26 +0100, Stefano Avallone wrote: On Monday 09 February 2009 20:28:14 Johannes Engel wrote: Jesse Barnes wrote: Interesting, thanks for trying to narrow it down. I don't see anything on re-review that would cause huge increases in the amount of memory used, though the additional alignment we apply in that patch will increase things somewhat, so might make the problem happen faster. Are you using UXA or EXA? You are probably right here, Jesse: Letting Xorg run with UXA on my GM945 turns out to show a similar problem after a couple of hours or similar. sudo lsof | grep drm mm object | wc -l shows the incredible number of 2407... Since cairo-perf will cause a leak of a couple of GiB in a few seconds on my i915, I was able to track down the cause pretty quickly. It turns out not to be limited to uxa at all, just uxa exercises the bufmgr much more than exa. The issue appears to be the bufmgr cache handling which appears unbounded. Its use was introduced with: commit a893f176dda0b64f7dadfda6bf0331240037851e Author: Carl Worth cwo...@cworth.org Date: Fri Jul 25 15:56:35 2008 -0700 Add call to intel_bufmgr_gem_enable_reuse So you can try reverting that commit and confirming if that clears the issue for you. Longer term, I think the buffer cache should be moved into the kernel, as when using client-side rendering we may end up with a bo cache per application. Moving it to the kernel should allow the cache to be shared and for it to reaped in low memory conditions. AIUI, we need to cache bo in order to reduce the cost associated with creating a new shmem object, mapping the page lists and to minimise clflush. The easiest approach would seem to be to add a dev_priv-cache_list and a new create ioctl that took interested domains and returned the current ones for the new object. (One of the improvements I found in cache usage was in relaxing the busy condition for buffers which I knew would only be used for GPU writes and so would be serialised by the batch scheduling.) Suggestions? Ideas? Patches? -ickle ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: [Intel-gfx] xf86-video-intel memory leakage
Chris Wilson wrote: Since cairo-perf will cause a leak of a couple of GiB in a few seconds on my i915, I was able to track down the cause pretty quickly. It turns out not to be limited to uxa at all, just uxa exercises the bufmgr much more than exa. The issue appears to be the bufmgr cache handling which appears unbounded. Its use was introduced with: commit a893f176dda0b64f7dadfda6bf0331240037851e Author: Carl Worth cwo...@cworth.org Date: Fri Jul 25 15:56:35 2008 -0700 Add call to intel_bufmgr_gem_enable_reuse So you can try reverting that commit and confirming if that clears the issue for you. I am sorry, Chris, but that does not make it any better for me. :( The real issue seems to be another one... Cheers, Johannes ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
Anyway the problem appears only with UXA , with EXA I could start Xorg, but have no direct rendering. But that seems to be more due to some missing visuals, isn't it? Exactly. Bye Marco ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
Jesse Barnes wrote: Interesting, thanks for trying to narrow it down. I don't see anything on re-review that would cause huge increases in the amount of memory used, though the additional alignment we apply in that patch will increase things somewhat, so might make the problem happen faster. Are you using UXA or EXA? You are probably right here, Jesse: Letting Xorg run with UXA on my GM945 turns out to show a similar problem after a couple of hours or similar. sudo lsof | grep drm mm object | wc -l shows the incredible number of 2407... Cheers, Johannes. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
Jesse Barnes wrote: I don't see anything on re-review that would cause huge increases in the amount of memory used, though the additional alignment we apply in that patch will increase things somewhat, so might make the problem happen faster. Are you using UXA or EXA? For me that problem happens only with UXA. Cheers, Johannes ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
Marco schrieb: Same for me, starting iceweasel on my GM45 bump suddenly out of swap. Bisected to: deneb:~/src/xf86-video-intel.git# git bisect view commit 8d4bc36fae50b09a73ba2cfab920adb32141a358 Author: Jesse Barnes jbar...@virtuousgeek.org Date: Mon Jan 26 17:14:06 2009 -0800 Support tiled back/depth on 915-class hardware with DRI2. Set alignments, tile settings and flags correctly in the 2D driver to suppor tiled rendering. UXA's create pixmap function currently assumes the worst about the alignment constraints; that should probably be fixed. Some of the 1M alignment fixes could probably be done more cleanly as well. (END) In fact after reverting it, all seems fine. I can confirm that for my 945GM. Don't know if that is really the culprit or just what makes another error more obvious... Cheers, Johannes ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
I have xf86-video-intel master from git and kernel 2.6.29-rc3 at commit b1792e367053968f2ddb48bc911d314143ce6242. I have to say that I also merged wirless-testing and drm-airlied/drm-fixes (Merge: 9ceb716... ac048e1...) Anyway the problem appears only with UXA , with EXA I could start Xorg, but have no direct rendering. My card is (from Xorg.log): (**) intel(0): Option AccelMethod UXA (II) intel(0): Integrated Graphics Chipset: Intel(R) 945GM (--) intel(0): Chipset: 945GM Bye Marco On Sat, Feb 7, 2009 at 9:17 PM, Johannes Engel jcnen...@googlemail.com wrote: Marco schrieb: Same for me, starting iceweasel on my GM45 bump suddenly out of swap. Bisected to: deneb:~/src/xf86-video-intel.git# git bisect view commit 8d4bc36fae50b09a73ba2cfab920adb32141a358 Author: Jesse Barnes jbar...@virtuousgeek.org Date: Mon Jan 26 17:14:06 2009 -0800 Support tiled back/depth on 915-class hardware with DRI2. Set alignments, tile settings and flags correctly in the 2D driver to suppor tiled rendering. UXA's create pixmap function currently assumes the worst about the alignment constraints; that should probably be fixed. Some of the 1M alignment fixes could probably be done more cleanly as well. (END) In fact after reverting it, all seems fine. I can confirm that for my 945GM. Don't know if that is really the culprit or just what makes another error more obvious... Cheers, Johannes ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
Marco wrote: I have xf86-video-intel master from git and kernel 2.6.29-rc3 at commit b1792e367053968f2ddb48bc911d314143ce6242. I have to say that I also merged wirless-testing and drm-airlied/drm-fixes (Merge: 9ceb716... ac048e1...) Anyway the problem appears only with UXA , with EXA I could start Xorg, but have no direct rendering. But that seems to be more due to some missing visuals, isn't it? Cheers, Johannes ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
On Friday 06 February 2009 15:22:00 you wrote: Vasily Khoruzhick wrote: Hi, it seems that there's a huge memory leakage in xf86-video-intel from git. For some reason, it eats all available swap in few minutes and system becomes unresponsible. As you can see on attached screenshot, all swap is eaten, but there's still a lot free real memory available. Are you using UXA or EXA? Cheers, Johannes Bug is reproducible only with UXA, it seems EXA is not affected Regards Vasily signature.asc Description: This is a digitally signed message part. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
On Friday 06 February 2009 15:22:00 you wrote: Vasily Khoruzhick wrote: Hi, it seems that there's a huge memory leakage in xf86-video-intel from git. For some reason, it eats all available swap in few minutes and system becomes unresponsible. As you can see on attached screenshot, all swap is eaten, but there's still a lot free real memory available. Are you using UXA or EXA? Cheers, Johannes But it seems there's some artifacts with EXA :\ (Black rectangles, sometimes with random colors) I can post screenshots if you want Regards Vasily signature.asc Description: This is a digitally signed message part. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
On Friday 06 February 2009 21:07:27 Andrew Barr wrote: Another me too post. It seems to be a lot worse when a compositing manager is active, but it is present nonetheless without one. I've seen it under KWin's OpenGL compositor as well as Compiz. I can't say for sure about XRender under Metacity. I wonder if xf86-video-intel developers perform testing on gma950 hardware. I suspect they don't, just because it's impossible to get 3D on 2008Q4 package on gma950 (guys, c'mon, compiz doesn't takes too much resources, but it doesn't work well on 2008q4 with gma950). This bug just prove that fact. Regards Vasily signature.asc Description: This is a digitally signed message part. ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
On Friday, February 6, 2009 2:21 pm Marco wrote: Same for me, starting iceweasel on my GM45 bump suddenly out of swap. Bisected to: deneb:~/src/xf86-video-intel.git# git bisect view commit 8d4bc36fae50b09a73ba2cfab920adb32141a358 Author: Jesse Barnes jbar...@virtuousgeek.org Date: Mon Jan 26 17:14:06 2009 -0800 Support tiled back/depth on 915-class hardware with DRI2. Set alignments, tile settings and flags correctly in the 2D driver to suppor tiled rendering. UXA's create pixmap function currently assumes the worst about the alignment constraints; that should probably be fixed. Some of the 1M alignment fixes could probably be done more cleanly as well. (END) In fact after reverting it, all seems fine. Interesting, thanks for trying to narrow it down. I don't see anything on re-review that would cause huge increases in the amount of memory used, though the additional alignment we apply in that patch will increase things somewhat, so might make the problem happen faster. Are you using UXA or EXA? -- Jesse Barnes, Intel Open Source Technology Center ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: xf86-video-intel memory leakage
Vasily Khoruzhick anarsoul at gmail.com writes: I wonder if xf86-video-intel developers perform testing on gma950 hardware. I have a 965-class GMA X3100. Sorry for not being clear. Andrew ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg