dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.39.3 nouveau_gart_manager_new() leaks memory
@ 2011-07-28 10:07 Frank van Maarseveen
  2011-08-04 10:39 ` 2.6.39.3 nouveau_gart_manager_new() leaks memory (FIX) Frank van Maarseveen
  0 siblings, 1 reply; 2+ messages in thread
From: Frank van Maarseveen @ 2011-07-28 10:07 UTC (permalink / raw)
  To: dri-devel

/proc/slabinfo shows an anomaly on a 2.6.39.3 x86_64 system. After
running F14 + kde4 for a while it shows high kmalloc-192 numbers:

# name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab>...
kmalloc-192       735694 735723    264   31    2 : tunables    0    0    0 : slabdata  23733  23733      0

Digging in /sys/kernel/slab/kmalloc-192/alloc_calls one line stands out:

 701960 nouveau_gart_manager_new+0x5d/0xf0 age=24/7405655/87972315 pid=1-4920 cpus=0-3

There are 709907 allocations total and according to
/sys/kernel/slab/kmalloc-192/free_calls there are 52245 free
calls total.

-- 
Frank

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.6.39.3 nouveau_gart_manager_new() leaks memory (FIX)
  2011-07-28 10:07 2.6.39.3 nouveau_gart_manager_new() leaks memory Frank van Maarseveen
@ 2011-08-04 10:39 ` Frank van Maarseveen
  0 siblings, 0 replies; 2+ messages in thread
From: Frank van Maarseveen @ 2011-08-04 10:39 UTC (permalink / raw)
  To: dri-devel

On Thu, Jul 28, 2011 at 12:07:53PM +0200, Frank van Maarseveen wrote:
> /proc/slabinfo shows an anomaly on a 2.6.39.3 x86_64 system. After
> running F14 + kde4 for a while it shows high kmalloc-192 numbers:
> 
> # name <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab>...
> kmalloc-192       735694 735723    264   31    2 : tunables    0    0    0 : slabdata  23733  23733      0
> 
> Digging in /sys/kernel/slab/kmalloc-192/alloc_calls one line stands out:
> 
>  701960 nouveau_gart_manager_new+0x5d/0xf0 age=24/7405655/87972315 pid=1-4920 cpus=0-3
> 
> There are 709907 allocations total and according to
> /sys/kernel/slab/kmalloc-192/free_calls there are 52245 free
> calls total.

This seems to fix it:

diff -Nurp a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c	2011-05-19 06:06:34.000000000 +0200
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c	2011-08-03 10:58:22.919205352 +0200
@@ -848,6 +848,7 @@ nouveau_gart_manager_del(struct ttm_mem_
 		nouveau_vm_unmap(&node->tmp_vma);
 		nouveau_vm_put(&node->tmp_vma);
 	}
+	kfree(node);
 	mem->mm_node = NULL;
 }

-- 
Frank

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-04 10:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 10:07 2.6.39.3 nouveau_gart_manager_new() leaks memory Frank van Maarseveen
2011-08-04 10:39 ` 2.6.39.3 nouveau_gart_manager_new() leaks memory (FIX) Frank van Maarseveen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox