Bug 32328

Summary: gem_objects and virtual memory leak
Product: DRI Reporter: Miron C <c1.freedesktop>
Component: DRM/IntelAssignee: Chris Wilson <chris>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jbarnes
Version: unspecifiedKeywords: NEEDINFO
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Miron C 2010-12-11 17:38:50 UTC
xorg virtual memory increases by 8MB every time I change the desktop background. gem_objects bytes increase by 3.8MB.  xrestop is stable. 

Running the intel driver, gnome, compiz, nautilus.

Linux mimiv 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 10:18:49 UTC 2010 i686 GNU/Linux

ii xserver-xorg-video-intel 2:2.12.0-1ubuntu5.1
ii xorg 1:7.5+6ubuntu3 X.Org X Window System
ii xserver-xorg 1:7.5+6ubuntu3 the X.Org X server
ii xserver-xorg-core 2:1.9.0-0ubuntu7 Xorg X server - core server
Comment 1 Chris Wilson 2010-12-12 12:42:31 UTC
It would have better had you not chosen a kernel with a known memory leak. That one leaks a vma for every mapped object...
Comment 2 Miron C 2010-12-13 09:02:39 UTC
This is the kernel on the current version of Ubuntu Maverick.  Did they not patch this issue?  Do you know what version of the kernel this was fixed in?

And to confirm, this would show up as a virt memory leak on the xorg process?
Comment 3 Chris Wilson 2011-04-05 03:55:20 UTC
commit bfba6d6148b938588ffbefdf04f4e71683c66dfd
Author: Krzysztof Halasa <khc@pm.waw.pl>
Date:   Tue Sep 21 22:56:26 2010 +0100

    Allow interlaced modes.
    
    This may not the best method, but it should be a good base on which to
    build...
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

(The GPU hang should have been fixed separately, but we have no details upon that...)
Comment 4 Chris Wilson 2011-04-05 03:59:30 UTC
(In reply to comment #2)
> This is the kernel on the current version of Ubuntu Maverick.  Did they not
> patch this issue?  Do you know what version of the kernel this was fixed in?

commit 31dfbc93923c0aaa0440b809f80ff2830c6a531a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Sep 27 21:28:30 2010 +0100

    drm: Prune GEM vma entries
    
    Hook the GEM vm open/close ops into the generic drm vm open/close so
    that the private vma entries are created and destroy appropriately.
    Fixes the leak of the drm_vma_entries during the lifetime of the filp.
    
    Reported-by: Matt Mackall <mpm@selenic.com>
    Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie <airlied@redhat.com>

> And to confirm, this would show up as a virt memory leak on the xorg process?

Yes.

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.