From: Karim Yaghmour <karim@opersys.com>
To: tglx@linutronix.de
Cc: Roman Zippel <zippel@linux-m68k.org>, Andi Kleen <ak@muc.de>,
Nikita Danilov <nikita@clusterfs.com>,
LKML <linux-kernel@vger.kernel.org>,
Tom Zanussi <zanussi@us.ibm.com>,
Robert Wisniewski <bob@watson.ibm.com>
Subject: Re: 2.6.11-rc1-mm1
Date: Sun, 16 Jan 2005 21:24:02 -0500 [thread overview]
Message-ID: <41EB21C2.3020608@opersys.com> (raw)
In-Reply-To: <1105925842.13265.364.camel@tglx.tec.linutronix.de>
Thomas Gleixner wrote:
> Which is every 1.42 seconds on a 3GHz machine. I guess we don't have
> GB's of data when the 1.42 seconds elapse without an event.
My argument was about being able to browse the amount of data I was
refering to. The hearbeat thing was an asside to Roman as to the
fact that we already do what he's suggesting.
> I still don't see the point. The implicit ability of LTT to allow
> tracing of up to 8192 bytes user data, strings and XML makes this
> neccecary. I do not see any neccecarity to integrate this special usage
> modes instead of an generic usable instrumentation implementation.
I've already clarified your mischaracterization of custom events,
you are being dissengenious here. If you want a generalized hooking
mechanism, feel free to ask Andrew to take kernel hooks:
http://www-124.ibm.com/developerworks/oss/linux/projects/kernelhooks/
> If relayfs is giving those users the ability to do so then they can do
> it, but I object the fact that LTT/relayfs is occupying the place of a
> more generic implementation in the way it is implemeted now.
Again, damned if we do, damned if don't. LTT isn't meant for kernel
debugging per se, though you can use it to that end to a certain extent.
However, if you are kernel debugging, you will find the ad-hoc mode I'm
talking about adding to relayfs quite useful.
> For normal event tracing you have about 32-64 byte of data per event. So
> disabling interrupts in order to copy this amount of imformation into a
> buffer is cheaper on most architectures than doing the whole magic in
> LTT and relayfs. This also keeps your buffers consistent and does not
> need any magic for postprocessing.
Oh, now you want to lighten the weight on postprocessing? Common Thomas,
please stop wasting my time.
Note, however, that we are thinking of dropping the lockless scheme
for now. We will pick up this discussion separately further down the
road.
> Sorting out disabled events in the hot path and moving the if
> (pid/gid/grp) whatever stuff into userspace postprocessing is not an
> alien request.
It is. Have you even read what I suggested to change in my other mail:
if ((any_filtering) && !(ltt_filter(event_id, event_struct, data)))
return -EINVAL;
You're not honestly telling me that checking for any_filtering is
going to ruin your day.
> You are talking of Gigabytes of data. In what time ?
>
> Let's do some math.
>
> For simplicity all events use 64 Byte event space.
>
> ~ 64kB/sec for 1000 events/s (event frequency 1kHz) ( 1 ms)
> 1024kB/sec for 16 events/ms (event frequency 16kHz) (62 us)
> 2048kB/sec for 32 events/ms (event frequency 32kHz) (31 us)
> 4096kB/sec for 64 events/ms (event frequency 64kHz) (15 us)
> 8192kB/sec for 128 events/ms (event frequency 128kHz) ( 8 us)
>
> where a 100Mbit network can theoretically transport 10240kB/sec and
> practically does 4000-8000 kB/sec.
>
> An event frequency of 8us even on a 3 GHz machine is complete illusion,
> because we spend already a couple of usecs in servicing the legacy 8254
> timer.
>
> So the realistic assumption on a 3Ghz machine is definitely below 64kHz,
> which means we have to handle max. 4Mb of data per second.
Actually, on a PII-350MHz, I was already generating 0.5MB/s of data
just by running an X session. If we assume that a machine 10 times
faster generates 10 times as many events, we've already got 5MB/s,
and I'm sure that there are heavier cases than X.
Here's the paper if you want to read it:
http://www.opersys.com/ftp/pub/LTT/Documentation/ltt-usenix.ps.gz
> I'm not impressed. Disabling interrupts for a couple of nano seconds to
> store the trace data in the buffer does not hurt at all. Running through
> a big bunch of out of cache line instructions does.
Like I said above, fighting for/against lockless is not our immediate
goal, and we will likely remove it.
> If you try to trace more than this amount you are toast anyway.
>
> Please beware me of "reality has bitten" arguments. The whole if(..)
> scenario in _ltt_event_log() is doing postprocessing, which can be done
> in userspace. I don't care about the required time as long as it does
> not introduce additional burden into the kernel.
Not even Ingo hinted at getting rid of filtering. Remember the earlier
e-mail I refered to? Here's what he was suggesting:
> void trace(event, data1, data2, data3)
> {
> int cpu = smp_processor_id();
> int idx, pending, *curr = curr_idx + cpu;
> struct trace_event *t;
> unsigned long flags;
>
> if (!event_wanted(current, event, data1, data2, data3))
> return;
>
> local_irq_save(flags);
>
> idx = ++curr_idx[cpu] & (NR_TRACE_ENTRIES - 1);
> pending = ++curr_pending[cpu];
>
> t = trace_ring[cpu] + idx;
>
> t->event = event;
> rdtscll(t->timestamp);
> t->data1 = data1;
> t->data2 = data2;
> t->data3 = data3;
>
> if (curr_pending == TRACE_LOW_WATERMARK && tracer_task)
> wake_up_process(tracer_task);
>
> local_irq_restore(flags);
> }
Notice the "event_wanted()"?
Original found here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103273730326318&w=2
Again, Thomas, I don't mind hearing you out, but please don't waste
my time.
> Be aware that there are some unhappy campers in the kernel community too
> when the special purpose tracing is included instead of a general usable
> framework.
Like I said, we are willing to accomodate those who want to be able
to use relayfs for kernel debugging purposes, but we can hardly
be blamed for not making LTT a generic kernel debugging tool as this
is exactly the excuse many kernel developers had for not including
LTT to start with. It's just totally dissengenious for giving us
grief for claiming that we are doing something and then later turn
around and blame us for not doing it ... cheesh ...
Karim
--
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim@opersys.com || 1-866-677-4546
next prev parent reply other threads:[~2005-01-17 2:16 UTC|newest]
Thread overview: 142+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-14 8:23 2.6.11-rc1-mm1 Andrew Morton
2005-01-14 8:47 ` 2.6.11-rc1-mm1 Andi Kleen
2005-01-14 9:27 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-14 10:27 ` 2.6.11-rc1-mm1 Nikita Danilov
2005-01-14 10:38 ` 2.6.11-rc1-mm1 Andi Kleen
2005-01-14 11:06 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-14 15:31 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-14 21:11 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-14 22:58 ` 2.6.11-rc1-mm1 Tim Bird
2005-01-15 0:20 ` 2.6.11-rc1-mm1 Andi Kleen
2005-01-15 4:25 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-15 1:06 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-15 4:18 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 2:38 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-16 6:00 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 16:52 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-16 21:18 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-17 1:37 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-17 2:24 ` Karim Yaghmour [this message]
2005-01-17 12:20 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-17 20:32 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-17 22:31 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-17 22:42 ` 2.6.11-rc1-mm1 Robert Wisniewski
2005-01-17 23:26 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-17 23:41 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-18 0:02 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-18 3:05 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-17 13:54 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-17 21:27 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-17 23:57 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-18 4:03 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-18 4:30 ` 2.6.11-rc1-mm1 Aaron Cohen
2005-01-18 4:46 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-18 8:07 ` 2.6.11-rc1-mm1 Tom Zanussi
2005-01-18 16:40 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-18 19:37 ` 2.6.11-rc1-mm1 Tom Zanussi
2005-01-18 15:31 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-21 6:26 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-21 22:23 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-23 7:43 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-23 7:52 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-23 8:28 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-24 0:38 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-25 9:12 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-18 1:13 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-18 2:52 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-17 17:02 ` 2.6.11-rc1-mm1 Tom Zanussi
2005-01-16 19:05 ` 2.6.11-rc1-mm1 Tom Zanussi
2005-01-19 11:14 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-19 16:53 ` 2.6.11-rc1-mm1 Tom Zanussi
2005-01-16 16:14 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-16 19:47 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 20:30 ` 2.6.11-rc1-mm1 Tom Zanussi
2005-01-19 11:11 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-14 15:24 ` 2.6.11-rc1-mm1 Roman Zippel
2005-01-18 11:19 ` 2.6.11-rc1-mm1 Masami Hiramatsu
2005-01-18 11:46 ` 2.6.11-rc1-mm1 Andi Kleen
2005-01-18 14:52 ` [Lkst-develop] 2.6.11-rc1-mm1 Masami Hiramatsu
2005-01-14 12:36 ` 2.6.11-rc1-mm1 Miklos Szeredi
2005-01-14 13:04 ` 2.6.11-rc1-mm1 Kasper Sandberg
2005-01-14 18:35 ` 2.6.11-rc1-mm1 Andrew Morton
2005-01-14 19:08 ` 2.6.11-rc1-mm1 Rogério Brito
2005-01-14 19:41 ` 2.6.11-rc1-mm1 Peter Buckingham
2005-01-17 17:04 ` 2.6.11-rc1-mm1 Matthias Urlichs
2005-01-14 19:02 ` 2.6.11-rc1-mm1 Bill Davidsen
2005-01-14 15:07 ` 2.6.11-rc1-mm1 Barry K. Nathan
2005-01-14 16:56 ` 2.6.11-rc1-mm1 Dave Jones
2005-01-14 17:55 ` 2.6.11-rc1-mm1 Barry K. Nathan
2005-01-19 23:06 ` 2.6.11-rc1-mm1 Marcos D. Marado Torres
2005-01-19 23:54 ` 2.6.11-rc1-mm1 Barry K. Nathan
2005-01-14 15:35 ` 2.6.11-rc1-mm1 Zwane Mwaikambo
2005-01-14 22:03 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-14 17:35 ` [patch] 2.6.11-rc1-mm1: ip_tables.c: ipt_find_target must be EXPORT_SYMBOL'ed Adrian Bunk
2005-01-14 17:43 ` Patrick McHardy
2005-01-14 22:41 ` 2.6.11-rc1-mm1 Tim Bird
2005-01-14 22:46 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-14 23:22 ` 2.6.11-rc1-mm1 Tim Bird
2005-01-15 0:24 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-15 1:27 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 16:18 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-15 13:08 ` [RFC] Instrumentation (was Re: 2.6.11-rc1-mm1) Thomas Gleixner
2005-01-16 2:09 ` Karim Yaghmour
2005-01-16 3:11 ` Roman Zippel
2005-01-16 4:23 ` Karim Yaghmour
2005-01-16 23:43 ` Thomas Gleixner
2005-01-17 1:54 ` Karim Yaghmour
2005-01-17 10:26 ` Thomas Gleixner
2005-01-17 20:34 ` Karim Yaghmour
2005-01-17 22:18 ` Thomas Gleixner
2005-01-17 23:57 ` Karim Yaghmour
2005-01-18 8:46 ` Thomas Gleixner
2005-01-18 16:31 ` Karim Yaghmour
2005-01-19 7:13 ` Werner Almesberger
2005-01-19 17:38 ` Karim Yaghmour
2005-01-14 22:48 ` 2.6.11-rc1-mm1 Andre Eisenbach
2005-01-15 8:42 ` 2.6.11-rc1-mm1 Miklos Szeredi
2005-01-15 8:45 ` 2.6.11-rc1-mm1 Miklos Szeredi
[not found] ` <1105740276.8604.83.camel@tglx.tec.linutronix.de>
2005-01-14 23:09 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-15 0:01 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-15 0:26 ` 2.6.11-rc1-mm1 Andrew Morton
2005-01-15 1:00 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-15 1:25 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-15 10:20 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-16 4:13 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 15:19 ` 2.6.11-rc1-mm1 Robert Wisniewski
2005-01-15 1:14 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-15 9:57 ` 2.6.11-rc1-mm1 Thomas Gleixner
2005-01-16 16:21 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-16 19:49 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 20:11 ` 2.6.11-rc1-mm1 Robert Wisniewski
2005-01-16 20:32 ` 2.6.11-rc1-mm1 Andrew Morton
2005-01-16 21:06 ` 2.6.11-rc1-mm1 Robert Wisniewski
2005-01-16 21:40 ` 2.6.11-rc1-mm1 Arjan van de Ven
2005-01-17 15:48 ` 2.6.11-rc1-mm1 Robert Wisniewski
2005-01-17 16:13 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-17 21:38 ` 2.6.11-rc1-mm1 Karim Yaghmour
2005-01-16 20:39 ` 2.6.11-rc1-mm1 Christoph Hellwig
2005-01-16 21:14 ` 2.6.11-rc1-mm1 Robert Wisniewski
2005-01-15 2:58 ` 2.6.11-rc1-mm1 William Lee Irwin III
2005-01-17 22:19 ` 2.6.11-rc1-mm1 William Lee Irwin III
2005-01-16 0:59 ` 2.6.11-rc1-mm1 Joseph Fannin
2005-01-16 19:09 ` 2.6.11-rc1-mm1 Daniel Drake
2005-01-16 19:20 ` 2.6.11-rc1-mm1 William Lee Irwin III
2005-01-16 21:09 ` 2.6.11-rc1-mm1 Daniel Drake
2005-01-17 23:31 ` 2.6.11-rc1-mm1 J.A. Magallon
2005-01-18 2:35 ` 2.6.11-rc1-mm1 Daniel Drake
2005-01-18 2:54 ` [PATCH] Wait and retry mounting root device (revised) Daniel Drake
2005-01-18 0:34 ` Al Viro
2005-01-18 0:02 ` Randy.Dunlap
2005-01-18 8:05 ` Andries Brouwer
2005-01-18 8:28 ` Helge Hafting
2005-01-18 8:49 ` Andrew Morton
2005-01-18 13:20 ` Helge Hafting
2005-01-20 20:55 ` [PATCH] Configurable delay before mounting root device Daniel Drake
2005-01-20 20:24 ` Andrew Morton
2005-01-21 18:15 ` Daniel Drake
2005-01-20 22:49 ` William Park
2005-01-18 1:03 ` [PATCH] Wait and retry mounting root device (revised) William Park
2005-01-19 0:43 ` Werner Almesberger
2005-01-18 8:02 ` Andries Brouwer
2005-01-19 20:11 ` Frank van Maarseveen
-- strict thread matches above, loose matches on Subject: below --
2005-01-17 6:49 2.6.11-rc1-mm1 Prasanna S Panchamukhi
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=41EB21C2.3020608@opersys.com \
--to=karim@opersys.com \
--cc=ak@muc.de \
--cc=bob@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita@clusterfs.com \
--cc=tglx@linutronix.de \
--cc=zanussi@us.ibm.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