From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-kernel@vger.kernel.org,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH] kmemleak: Do not use off-slab management with SLAB_NOLEAKTRACE
Date: Fri, 16 Oct 2009 15:17:28 +0300 [thread overview]
Message-ID: <84144f020910160517t5247f49dpefcd58f5058fa153@mail.gmail.com> (raw)
In-Reply-To: <1255694894.3008.40.camel@pc1117.cambridge.arm.com>
On Fri, Oct 16, 2009 at 3:08 PM, Catalin Marinas
<catalin.marinas@arm.com> wrote:
> On Thu, 2009-10-15 at 21:59 +0300, Pekka Enberg wrote:
>> Catalin Marinas wrote:
>> > With the slab allocator, if off-slab management is enabled for the
>> > kmem_caches used by kmemleak, it leads to recursive calls into
>> > kmemleak_alloc(). Off-slab management can be triggered by other config
>> > options increasing the slab size, e.g. DEBUG_PAGEALLOC.
>> >
>> > Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
>> > Cc: Pekka Enberg <penberg@cs.helsinki.fi>
>> > Cc: Christoph Lameter <cl@linux-foundation.org>
>> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
>>
>> Forcing slabs to use on-slab management is pretty bad from memory
>> consumption point of view. Wouldn't it be better to annotate the
>> recursive calls somehow?
>
> The are annotated using SLAB_NOLEAKTRACE but off-slab management uses a
> general cachep and we cannot use this flag on them as we end up ignoring
> kmalloc allocations. An alternative is to use GFP_ flag rather than a
> SLAB_ one to track the recursive calls.
>
> I could also rework the way hooks were added to slab.c but currently
> they follow the same places as kmemcheck_slab_alloc and
> lockdep_trace_alloc.
>
> Anyway, the kmemleak caches only need off-slab management when
> DEBUG_PAGEALLOC is enabled but in this case the memory consumption is
> high anyway.
Oh, right, I misread the patch, sorry. Please feel free to put the
patch in kmemleak.git:
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
prev parent reply other threads:[~2009-10-16 12:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 15:31 Catalin Marinas
2009-10-15 18:59 ` Pekka Enberg
2009-10-16 12:08 ` Catalin Marinas
2009-10-16 12:17 ` Pekka Enberg [this message]
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=84144f020910160517t5247f49dpefcd58f5058fa153@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=catalin.marinas@arm.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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®