From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Randy Dunlap <randy.dunlap@oracle.com>,
Elias Oltmanns <eo@nebensachen.de>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Clark Williams <clark.williams@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jon Masters <jonathan@jonmasters.org>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH -v2] ftrace: Documentation
Date: Fri, 11 Jul 2008 16:16:43 -0700 [thread overview]
Message-ID: <m13amg9fl0.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <20080711153740.b86acadd.akpm@linux-foundation.org> (Andrew Morton's message of "Fri, 11 Jul 2008 15:37:40 -0700")
Andrew Morton <akpm@linux-foundation.org> writes:
> On Fri, 11 Jul 2008 16:59:53 -0400 (EDT) Steven Rostedt <rostedt@goodmis.org>
>> > > +
>> > > +Here's an example of the output format of the file "trace"
>> > > +
>> > > + --------
>> > > +# tracer: ftrace
>> > > +#
>> > > +# TASK-PID CPU# TIMESTAMP FUNCTION
>> > > +# | | | | |
>> > > + bash-4251 [01] 10152.583854: path_put <-path_walk
>> > > + bash-4251 [01] 10152.583855: dput <-path_put
>> > > + bash-4251 [01] 10152.583855: _atomic_dec_and_lock <-dput
>> > > + --------
>> >
>> > pids are no longer unique system-wide, and any part of the kernel ABI which
>> > exports them to userspace is, basically, broken. Oh well.
>>
>> What should be used instead? Of course we're not using a kernel ABI, we
>> are using an API (text based ;-) But more on that later.
>
> Well that's an interesting question and it has come up before. There
> are times when the kernel wants to display a process identifier at
> least in a printk. Oopses are one prominent example.
>
> Perhaps we do need a way of doing this in a post-pid-namespace-world.
> Presumably it would be of the form "pidns-identifier:pid", and just
> plain old "pid" if no pid namespaces are in operation, for some
> back-compatibility where possible.
>
> Eric, any thoughts?
I don't quite know what we are doing here. Is this a /proc or /sysfs file?
After a long series of discussion on semantics what we came up with
was that the pid namespaces are hierarchical and that a struct pid
will have a numerical identifier in each pid namespace. Which means
that for printing pids in the case of printks especially for oops
reports we can just go with pid number in the init_pid_ns. Which is
the classic system wide pid.
In every other case I know besides printk we are delivering the data to an
application, and that application is running in a pid namespace
therefore we really want to figure out the pid namespace and give it the
information.
For filesystem interfaces (besides proc which provides a natural split)
the classic answer is to capture namespaces at mount time. And display
the data in the filesystem relative to the namespaces we captured.
Eric
next prev parent reply other threads:[~2008-07-11 23:22 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 16:46 [PATCH] ftrace: Documentation Steven Rostedt
2008-07-10 18:16 ` Jon Masters
2008-07-10 19:59 ` Elias Oltmanns
2008-07-10 20:28 ` Randy Dunlap
2008-07-11 0:02 ` Steven Rostedt
2008-07-11 0:37 ` [PATCH -v2] " Steven Rostedt
2008-07-11 19:16 ` Andrew Morton
2008-07-11 20:59 ` Steven Rostedt
2008-07-11 22:37 ` Andrew Morton
2008-07-11 23:16 ` Eric W. Biederman [this message]
2008-07-15 1:08 ` Steven Rostedt
2008-07-15 1:26 ` Eric W. Biederman
2008-07-15 1:43 ` Steven Rostedt
2008-07-15 1:59 ` Eric W. Biederman
2008-07-15 2:18 ` Steven Rostedt
2008-07-15 2:41 ` Eric W. Biederman
2008-07-15 3:05 ` Steven Rostedt
2008-07-15 3:29 ` Eric W. Biederman
2008-07-12 10:16 ` John Kacur
2008-07-16 10:10 ` Florian Weimer
2008-07-16 11:39 ` Steven Rostedt
2008-07-17 14:19 ` Christoph Hellwig
2008-07-18 2:47 ` Steven Rostedt
2008-07-20 11:16 ` Christoph Hellwig
2008-07-10 23:55 ` [PATCH] " Steven Rostedt
2008-07-11 7:51 ` Elias Oltmanns
2008-07-12 12:49 ` Abhishek Sagar
2008-07-15 14:39 ` Steven Rostedt
2008-07-15 15:33 ` Abhishek Sagar
2008-07-14 9:38 ` Peter Zijlstra
2008-07-14 18:02 ` David Teigland
2008-07-14 19:59 ` 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=m13amg9fl0.fsf@frodo.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=clark.williams@gmail.com \
--cc=eo@nebensachen.de \
--cc=jonathan@jonmasters.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=randy.dunlap@oracle.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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