[Intel-gfx] Huge memory leaks with GEM

Thomas Fjellstrom tfjellstrom at shaw.ca
Tue Jul 7 16:56:48 CEST 2009


On Tue July 7 2009, Johannes Engel wrote:
> Quoting Maxim Levitsky, On 07/06/2009 09:46 PM:
> > I have recently tried the latest versions of graphics stack for my G965
> > intel device.
> >
> >
> > First I must say thanks! The quality of everything did improve
> > significantly.
> >
> > I especially happy to see that GoogleEarth is finally usable. I remember
> > it being very slow back when I tried the intel drivers last time (I have
> > a nvidia card that I use most of the time on this system, and it is set
> > to hit the trash as soon as intel drivers became usable - I know that
> > performance will always be inferior, but as long as compiz, GE, and few
> > simple games work, I agree to that)
> >
> > However, it appears that current GEM implementation doesn't free buffers
> > at all.
> >
> > looking at  /sys/kernel/debug/dri/0/gem_objects reveals that more a GB
> > of buffers are allocated, after few minutes of GE use. In same time
> > usual signs of swapping appear. top confirms that GE uses more that a GB
> > of memory (this system has just 1GB of memory)
> >
> > This is what I see there:
> >
> > 4614 objects
> > 1152802816 object bytes
> > 3 pinned
> > 13762560 pin bytes
> > 137949184 gtt bytes
> > 260308992 gtt total
>
> I can confirm the same behaviour using 945GM with KDE4 + compositing.
> Especially running a Skype video session using two XVideo ports makes
> the objects increase by approx. 9~10 per sec.
> Having turned of the swap partition the whole system gets eaten up by
> extensive hard disk activity after a while, then Xorg restarts and the
> game starts again.

I've been noticing the same thing since I upgraded my intel drivers.

After about 24 hours, this is what I see: (most of the past 24 hours I haven't 
even been using it, it likes to leak just sitting there)

root at lisa:/home/moose# cat /sys/kernel/debug/dri/0/gem_objects
9897 objects
1234710528 object bytes
5 pinned
8491008 pin bytes
171089920 gtt bytes
234881024 gtt total

It makes for a rather unuseful laptop I dare say. Even though it has 2G ram, 
it starts running out in a few hours with KDE Compositing turned on.

Oh, also my laptop has a X4500HD (4500MHD) chipset:

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset 
Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller])
        Subsystem: Lenovo Device 20e4
        Flags: bus master, fast devsel, latency 0, IRQ 28
        Memory at fd400000 (64-bit, non-prefetchable) [size=4M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 5c00 [size=8]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [90] MSI: Mask- 64bit- Count=1/1 Enable+
        Capabilities: [d0] Power Management version 3
        Kernel driver in use: i915

So its not limited to the i965.

> Cheers, Johannes

-- 
Thomas Fjellstrom
tfjellstrom at shaw.ca



More information about the Intel-gfx mailing list