mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: sancelot@free.fr, linux-kernel@vger.kernel.org
Subject: Re: detecting kernel mem leak
Date: Tue, 29 Apr 2008 09:58:35 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0804290956360.10847@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <84144f020804290546h666983aci77fbb08eb507e777@mail.gmail.com>

On Tue, 29 Apr 2008, Pekka Enberg wrote:

> or use a tool such as slabtop to see where the memory is going. If the
> memory is being leaked in the kmalloc caches, you can use
> CONFIG_DEBUG_SLAB_LEAK which part of the kernel is doing all those
> allocations (not really suitable for production machines).

For slub: Just enable debugging and then do a cat on 
/sys/kernel/slab/<cachename>/allocs or frees to see where memory is 
allocated or freed.

 
> Christoph, I suppose there's some option to
> Documentation/vm/slabinfo.c that provides similar output to
> CONFIG_DEBUG_SLAB_LEAK for SLUB?

If you run a report on a slabcache with f.e.

	slabinfo kmalloc-2048

and debugging is enabled then all functions that allocate and free objects 
in kmalloc-2048 are listed.

Just doing
	slabinfo

list all caches with the number of objects allocated.


  reply	other threads:[~2008-04-29 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29  9:41 sancelot
2008-04-29 12:46 ` Pekka Enberg
2008-04-29 16:58   ` Christoph Lameter [this message]
     [not found]     ` <4821C526.8030901@free.fr>
2008-05-07 17:21       ` Christoph Lameter
2008-05-13  8:50         ` Stéphane ANCELOT
2008-05-13 19:45           ` Pekka Enberg
2008-05-15 10:58             ` Stéphane ANCELOT
2008-05-15 17:38           ` Christoph Lameter
2008-05-16  8:58             ` Stéphane ANCELOT
2008-05-16 18:50               ` Christoph Lameter
2008-05-13 10:26 Tomasz Chmielewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0804290956360.10847@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=sancelot@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®