From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
Vegard Nossum <vegard.nossum@gmail.com>,
Mel Gorman <mel@csn.ul.ie>, Jason Baron <jbaron@redhat.com>,
linux-kernel@vger.kernel.org, mm-commits@vger.kernel.org,
alexn@dsv.su.se, akpm@linux-foundation.org, alexn@telia.com,
apw@shadowen.org, cl@linux-foundation.org, haveblue@us.ibm.com,
kamezawa.hiroyu@jp.fujitu.com,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Steven Rostedt <rostedt@goodmis.org>,
Fr?d?ric Weisbecker <fweisbec@gmail.com>
Subject: Re: + page-owner-tracking.patch added to -mm tree
Date: Sat, 4 Apr 2009 17:08:52 +0300 [thread overview]
Message-ID: <20090404140852.GA5736@localhost> (raw)
In-Reply-To: <20090403144344.GA9643@elte.hu>
On Fri, Apr 03, 2009 at 04:43:44PM +0200, Ingo Molnar wrote:
>
> * Pekka Enberg <penberg@cs.helsinki.fi> wrote:
>
> > Ingo Molnar wrote:
> >> * Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> wrote:
> >>
> >>> One thing I'm not sure about this patch is whether it manages to
> >>> record an allocation only once, i.e. does it log a single event
> >>> when/if the slab allocator requests pages? Some time ago I sent a
> >>> patch adding GFP_NOTRACE to gfp.h, but was rejected. Maybe this
> >>> could be a way out of the mess.
> >>>
> >>> (GFP_NOTRACE would also allow us to log "backend" allocations easily
> >>> and treat them separately, for the record, or simply filter them
> >>> out.)
> >>
> >> makes a lot of sense IMO to annotate these via a GFP flag.
> >
> > Yup, make sense. I think I rejected the patch (did I?) because I
> > wanted to fix the slub/slab mess differently but here it makes
> > perfect sense.
Uh, I don't remember exactly, not sure who did it.
But to expand on the upside of doing it this way, we could expect to see
something like...
xxxxx CPU0 GFP_KERNEL kmalloc
xxxxx CPU0 GFP_KERNEL | GFP_NOTRACE __get_free_pages
xxxxx CPU0 GFP_KERNEL | GFP_NOTRACE kmalloc
xxxxx CPU0 GFP_KERNEL kmem_cache_alloc
So it's easy to see that allocations 2 and 3 are in fact part of the
fourth. It will get confused by IRQs, preemption and sleeping while
allocating, but we could use additional information (e.g. tracking
returned ptr's) to eliminate some/many such confusions in userspace.
> I'm wondering how much could be shared with the kmemcheck's
> internal-allocation annotations. There's some overlap (although not
> a full match) i suspect?
>
> Ingo
I had already suggested this to Vegard some time ago. Basically,
kmemcheck should hook to the same tracepoints. As far as I remember,
kmemtrace gets more info out of the allocators, so this should suit
kmemcheck as well. Though this would incur additional overhead for the
latter due to the extra parameters being passed, but kmemcheck is slow
anyway.
Eduard
next prev parent reply other threads:[~2009-04-04 14:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200903312321.n2VNLAMI006236@imap1.linux-foundation.org>
2009-04-01 11:15 ` + page-owner-tracking.patch added to -mm tree Ingo Molnar
2009-04-01 12:55 ` Mel Gorman
2009-04-01 13:17 ` Ingo Molnar
2009-04-01 13:32 ` Mel Gorman
2009-04-01 13:49 ` Ingo Molnar
2009-04-01 14:49 ` Pekka Enberg
2009-04-01 15:22 ` Ingo Molnar
2009-04-02 7:12 ` Pekka Enberg
2009-04-03 4:21 ` Eduard - Gabriel Munteanu
2009-04-03 14:17 ` Ingo Molnar
2009-04-03 14:36 ` Pekka Enberg
2009-04-03 14:43 ` Ingo Molnar
2009-04-04 14:08 ` Eduard - Gabriel Munteanu [this message]
2009-04-06 7:12 ` Pekka Enberg
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=20090404140852.GA5736@localhost \
--to=eduard.munteanu@linux360.ro \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=alexn@dsv.su.se \
--cc=alexn@telia.com \
--cc=apw@shadowen.org \
--cc=cl@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=haveblue@us.ibm.com \
--cc=jbaron@redhat.com \
--cc=kamezawa.hiroyu@jp.fujitu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=mingo@elte.hu \
--cc=mm-commits@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rostedt@goodmis.org \
--cc=vegard.nossum@gmail.com \
/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