public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* slub: fixed uninitialized counter in struct kmem_cache_node
@ 2008-09-11 19:25 Salman Qazi
  2008-09-11 19:35 ` Pekka Enberg
  2008-09-11 19:38 ` Pekka Enberg
  0 siblings, 2 replies; 3+ messages in thread
From: Salman Qazi @ 2008-09-11 19:25 UTC (permalink / raw)
  To: linux-kernel, cl, penberg


Initialized total objects atomic for the node in init_kmem_cache_node.  The uninitialized value was ruining the stats in /proc/slabinfo.

Signed-off-by: Salman Qazi <sqazi@google.com>
---

--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1932,6 +1932,7 @@ init_kmem_cache_node(struct kmem_cache_node *n, struct kmem_cache *s)
 	INIT_LIST_HEAD(&n->partial);
 #ifdef CONFIG_SLUB_DEBUG
 	atomic_long_set(&n->nr_slabs, 0);
+	atomic_long_set(&n->total_objects, 0);
 	INIT_LIST_HEAD(&n->full);
 #endif
 }


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

* Re: slub: fixed uninitialized counter in struct kmem_cache_node
  2008-09-11 19:25 slub: fixed uninitialized counter in struct kmem_cache_node Salman Qazi
@ 2008-09-11 19:35 ` Pekka Enberg
  2008-09-11 19:38 ` Pekka Enberg
  1 sibling, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2008-09-11 19:35 UTC (permalink / raw)
  To: Salman Qazi; +Cc: linux-kernel, cl

Salman Qazi wrote:
> Initialized total objects atomic for the node in init_kmem_cache_node.  The uninitialized value was ruining the stats in /proc/slabinfo.
> 
> Signed-off-by: Salman Qazi <sqazi@google.com>

Applied, thanks!

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

* Re: slub: fixed uninitialized counter in struct kmem_cache_node
  2008-09-11 19:25 slub: fixed uninitialized counter in struct kmem_cache_node Salman Qazi
  2008-09-11 19:35 ` Pekka Enberg
@ 2008-09-11 19:38 ` Pekka Enberg
  1 sibling, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2008-09-11 19:38 UTC (permalink / raw)
  To: Salman Qazi; +Cc: linux-kernel, cl

Salman Qazi wrote:
> Initialized total objects atomic for the node in init_kmem_cache_node.  The uninitialized value was ruining the stats in /proc/slabinfo.
> 
> Signed-off-by: Salman Qazi <sqazi@google.com>

Applied, thanks!

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

end of thread, other threads:[~2008-09-11 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11 19:25 slub: fixed uninitialized counter in struct kmem_cache_node Salman Qazi
2008-09-11 19:35 ` Pekka Enberg
2008-09-11 19:38 ` Pekka Enberg

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