public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] tracing/function-return-tracer: add the overrun field
Date: Tue, 18 Nov 2008 17:40:19 +0100	[thread overview]
Message-ID: <20081118164019.GA18620@elte.hu> (raw)
In-Reply-To: <c62985530811180831n132ed6dep77aa2684ff59861@mail.gmail.com>


* Frédéric Weisbecker <fweisbec@gmail.com> wrote:

> 2008/11/18 Ingo Molnar <mingo@elte.hu>:
> >
> > * Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> >>
> >> On Tue, 18 Nov 2008, Ingo Molnar wrote:
> >> > > >
> >> > > > that reminds me: ti->ret_stack[] should be moved to task->ret_stack[].
> >> > > > That way we decouple its size from any kernel stack size limits.
> >> > > > (thread-info resides at one end of the kernel stack, on x86)
> >> > >
> >> > > Yeah, I recommended that to Frederic to save space. But that can be
> >> > > dangerous. Using task instead would be safer with the downside of
> >> > > making the task struct even bigger.
> >> >
> >> > We almost never put new stuff into thread_info - we have the
> >> > lockdep lock stack in the task structure too, for similar reasons.
> >>
> >> Yeah, it was just a recommendation, and perhaps not a good one ;-)
> >>
> >> Frederic, it is better if you move the array from the thread info to
> >> the task struct. It will take up more memory but it is a hell of a
> >> lot safer. The pro here definitely outways the con.
> >
> > if the memory footprint starts mattering we could turn this into a
> > single pointer to an array - and add/remove these arrays (from all
> > tasks currently running) as the tracer is turned on/off.
> >
> >        Ingo
> >
> 
> Ok. So what do you suggest once? Do I begin to move the array from 
> thread info to struct task but by keeping the static array or should 
> I directly use a dynamic allocation and add/remove dynamically?

Would be nice to have the dynamic allocation straight away - the 
tracer looks rather useful but people wont enable it by default for 
sure. This way distros could enable it all by default without worrying 
about the memory overhead.

And with a dynamic array the tracer could even have a tunable 'max 
depth' option [only changeable when the tracer is not active].

So it all looks much nicer to me that way ... if you succeed in coding 
it up that is ;-) Changing all tasks at once is tricky business: you'd 
have to take the tasklist_lock and iterate over every user and kernel 
task - including idle tasks.

	Ingo

  reply	other threads:[~2008-11-18 16:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17  2:22 [PATCH 3/3] tracing/function-return-tracer: add the overrun field Frederic Weisbecker
2008-11-17  8:49 ` Ingo Molnar
2008-11-17 18:38   ` Frederic Weisbecker
2008-11-18  8:47     ` Ingo Molnar
2008-11-18 14:23       ` Steven Rostedt
2008-11-18 14:51         ` Ingo Molnar
2008-11-18 15:06           ` Steven Rostedt
2008-11-18 15:13             ` Ingo Molnar
2008-11-18 15:22               ` Steven Rostedt
2008-11-18 15:50                 ` Ingo Molnar
2008-11-18 16:31                   ` Frédéric Weisbecker
2008-11-18 16:40                     ` Ingo Molnar [this message]
2008-11-18 16:47                       ` Frédéric Weisbecker
2008-11-18 16:53                         ` Steven Rostedt
2008-11-18 16:58                           ` Frédéric Weisbecker
2008-11-18 17:00                             ` Frédéric Weisbecker
2008-11-18 21:01                               ` Ingo Molnar
2008-11-18 21:03                         ` Ingo Molnar
2008-11-19  7:35                           ` Frédéric Weisbecker
2008-11-21 19:39                           ` Frédéric Weisbecker
2008-11-21 19:48                             ` Ingo Molnar
2008-11-21 20:07                               ` Frédéric Weisbecker
2008-11-23 13:18                                 ` Ingo Molnar
2008-11-18 16:43                     ` Steven Rostedt
2008-11-18 14:21   ` Steven Rostedt
2008-11-18 14:48     ` Ingo Molnar
2008-11-18 14:58       ` Steven Rostedt
2008-11-18 15:02         ` Ingo Molnar
2008-11-18 15:11           ` Steven Rostedt

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=20081118164019.GA18620@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@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