From: Mel Gorman <mel@csn.ul.ie>
To: Ingo Molnar <mingo@elte.hu>
Cc: 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: Wed, 1 Apr 2009 13:55:07 +0100 [thread overview]
Message-ID: <20090401125506.GA6406@csn.ul.ie> (raw)
In-Reply-To: <20090401111540.GC15442@elte.hu>
On Wed, Apr 01, 2009 at 01:15:40PM +0200, Ingo Molnar wrote:
> > <VAST AMOUNTS OF SNIPPAGE>
> >
> > +static inline void __stack_trace(struct page *page, unsigned long *stack,
> > + unsigned long bp)
> > +{
> > + int i = 0;
> > + unsigned long addr;
> > + struct thread_info *tinfo = (struct thread_info *)
> > + ((unsigned long)stack & (~(THREAD_SIZE - 1)));
> > +
> > + memset(page->trace, 0, sizeof(long) * 8);
> > +
> > +#ifdef CONFIG_FRAME_POINTER
> > + if (bp) {
> > + while (valid_stack_ptr(tinfo, (void *)bp)) {
> > + addr = *(unsigned long *)(bp + sizeof(long));
> > + page->trace[i] = addr;
> > + if (++i >= 8)
> > + break;
> > + bp = *(unsigned long *)bp;
> > + }
> > + return;
> > + }
> > +#endif /* CONFIG_FRAME_POINTER */
> > + while (valid_stack_ptr(tinfo, stack)) {
> > + addr = *stack++;
> > + if (__kernel_text_address(addr)) {
> > + page->trace[i] = addr;
> > + if (++i >= 8)
> > + break;
> > + }
> > + }
> > +}
>
> Uhm, this is not acceptable and broken, we have generic stacktrace
> saving facilities for this precise purpose. It has other problems
> too.
>
> The purpose of the patch seems genuinely useful and i support the
> concept, but the current design is limiting (we could do much
> better) and the implementation is awful. Please.
>
> Has this patch been reviewed by or Cc:-ed to anyone versed in kernel
> instrumentation details, before it was applied to -mm? Those folks
> hang around the tracing tree usually so they are easy to find. :)
>
This patch is ancient, predating most of the instrumentation stuff by years. It
was dropped from -mm a few months ago because of changes in proc and this is
a rebase because it came up as being potentially useful pinning down memory
leaks when they occur.
I'm not sure when exactly it was introduced to -mm, but I see references
going back as far as 2.6.12-rc1 so it's no surprise this is now extremly
odd looking. However, there is no plan to merge this to mainline making the
effort of redoing it from scratch a questionable expenditure of time.
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
next prev parent reply other threads:[~2009-04-01 12:55 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 ` Ingo Molnar
2009-04-01 12:55 ` Mel Gorman [this message]
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
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=20090401125506.GA6406@csn.ul.ie \
--to=mel@csn.ul.ie \
--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=kamezawa.hiroyu@jp.fujitu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mm-commits@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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
Powered by JetHome