From: Ingo Molnar <mingo@elte.hu>
To: Karim Yaghmour <karim@opersys.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Roman Zippel <zippel@linux-m68k.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
LTT-Dev <ltt-dev@shafik.org>
Subject: Re: [PATCH] LTT for 2.5.38 1/9: Core infrastructure
Date: Mon, 23 Sep 2002 09:41:05 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.44.0209230929010.2659-100000@localhost.localdomain> (raw)
In-Reply-To: <3D8E5329.3DAB4A1B@opersys.com>
On Sun, 22 Sep 2002, Karim Yaghmour wrote:
> > - remove the 'event registration' and callback stuff. It just introduces
> > unnecessery runtime overhead. Use an include file as a registry of
> > events instead. This will simplify things greatly.
>
> OK, basically then all the trace points call the trace driver directly.
yes. And in fact i'd suggest to not make it a driver but create a new
kernel/trace.c file - if it's a central mechanism then it should live in a
central place.
> > Why do you need a
> > table of callbacks registered to an event? Nothing in your patches
> > actually uses it ...
>
> True, nothing in the patches actually uses it as this point. This was
> added with the mindset of letting other tools than LTT use the trace
> points already provided by LTT.
okay. The thing is that generic callbacks and data hooks in the task
structure are an invitation for various types of abuses - security and GPL
type abuses. People do get very nervous when seeing such stuff - eg. read
back Christoph Hellwig's comment from a few weeks ago. It's a red flag for
many people. Provide a clean and concentrated set of APIs, no callbacks,
no unnecessery hooks. I can see the technical reasons why you have added
it - it's in theory an extensible interface, but generally we tend to add
such stuff when it's needed - if it's needed at all.
> > Just use one tracing function that copies the
> > arguments into a per-CPU ringbuffer. It's really just a few lines.
>
> Sure, the writing of data itself is trivial. The reason you find the
> driver to be rather full is because of its need to do a couple of
> extra operations:
> - Get timestamp and use delta since begining of buffer to reduce
> trace size. (i.e. because of the rate at which traces are filled, it's
> essential to be able to cut down in the data written as much as possible).
yes - but even this one can also be solved by providing 2-3 macros that
each are hardcoded for one specific event length each - this should cover
about 90% of the events. Plus perhaps a more generic entry to handle the
longer/rarer event lengths, and the variable event length stuff.
> - Filter events according to event mask.
yes - this is handled by the event_allowed() function.
> - Copy extra data in case of some events (e.g. filenames). (We're
> working on ways to simplify this).
are you sure you want to copy filenames? File descriptor and inode numbers
ought to be enough.
> - Synchronize with trace daemon to save trace data. (A single per-CPU
> circular buffer may be useful when doing kernel devleopment, but user
> tracing often requires N buffers).
>
> In addition, because this data is available from user-space, you need to
> be able to deal with many buffers. For example, you don't want some
> random user to know everything that's happening on the entire system for
> obvious security reasons. So the tracer will need to be able to have
> per-user and per-process buffers.
in fact i have the feeling that you should not expose any of this to
ordinary users. Performance measurements are to be done by administrator
types - all this stuff has heavy memory allocation impact anyway.
in exactly which cases do you want to have multiple trace buffers? A
single (large enough if needed) buffer should be enough. This i think is
one of the core issues of your design.
Ingo
next prev parent reply other threads:[~2002-09-23 7:27 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-22 5:43 [PATCH] LTT for 2.5.38 1/9: Core infrastructure Karim Yaghmour
2002-09-22 10:42 ` Ingo Molnar
2002-09-22 10:50 ` Ingo Molnar
2002-09-22 17:26 ` Roman Zippel
2002-09-22 18:35 ` Linus Torvalds
2002-09-22 19:18 ` Karim Yaghmour
2002-09-22 19:40 ` Ingo Molnar
2002-09-22 22:09 ` Karim Yaghmour
2002-09-22 22:24 ` Ingo Molnar
2002-09-22 22:41 ` Karim Yaghmour
2002-09-22 22:59 ` Ingo Molnar
2002-09-22 22:50 ` Ingo Molnar
2002-09-22 23:32 ` Karim Yaghmour
2002-09-23 7:41 ` Ingo Molnar [this message]
2002-09-23 15:12 ` Karim Yaghmour
2002-09-23 20:11 ` Andreas Ferber
2002-09-23 23:31 ` Karim Yaghmour
2002-09-22 21:29 ` [ltt-dev] " bob
2002-09-22 19:06 ` Karim Yaghmour
2002-09-22 19:33 ` Karim Yaghmour
2002-09-22 21:20 ` [ltt-dev] " bob
2002-09-22 21:39 ` Ingo Molnar
2002-09-22 22:37 ` bob
2002-09-22 22:55 ` Ingo Molnar
2002-09-22 22:52 ` bob
2002-09-22 23:02 ` Ingo Molnar
2002-09-22 23:03 ` bob
2002-09-22 23:19 ` Ingo Molnar
2002-09-22 23:50 ` bob
2002-09-22 23:32 ` Ingo Molnar
2002-09-23 0:07 ` bob
2002-09-23 7:27 ` Ingo Molnar
2002-09-23 13:59 ` bob
2002-09-23 0:08 ` Karim Yaghmour
2002-09-22 22:58 ` Karim Yaghmour
[not found] <Pine.LNX.4.44.0209221830400.8911-100000@serv.suse.lists.linux.kernel>
[not found] ` <Pine.LNX.4.44.0209221130060.1455-100000@home.transmeta.com.suse.lists.linux.kernel>
2002-09-22 19:27 ` Andi Kleen
2002-09-24 1:07 ` john slee
2002-09-24 11:40 ` Andi Kleen
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=Pine.LNX.4.44.0209230929010.2659-100000@localhost.localdomain \
--to=mingo@elte.hu \
--cc=karim@opersys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ltt-dev@shafik.org \
--cc=torvalds@transmeta.com \
--cc=zippel@linux-m68k.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;
as well as URLs for NNTP newsgroup(s).