public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Karim Yaghmour <karim@opersys.com>
To: tglx@linutronix.de
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.11-rc1-mm1
Date: Fri, 14 Jan 2005 20:14:23 -0500	[thread overview]
Message-ID: <41E86E6F.6090004@opersys.com> (raw)
In-Reply-To: <1105747280.13265.72.camel@tglx.tec.linutronix.de>


Hello Thomas,

Gee Thomas, I guess you really want to take this one until the last
man is standing. Feel free to use the ad-hominem tone if it suits
you. Don't hold it against me though if I don't bite :)

Thomas Gleixner wrote:
> It's not only me, who needs constant time. Everybody interested in
> tracing will need that. In my opinion its a principle of tracing.

relayfs is a generalized buffering mechanism. Tracing is one application
it serves. Check out the web site: "high-speed data-relay filesystem."
Fancy name huh ...

> The "lockless" mechanism is _FAKE_ as I already pointed out. It replaces
> locks by do { } while loops. So what ?

Well for one thing, a portion of code running in user-context won't
disable interrupts while it's attempting to get buffer space, and
therefore won't impact on interrupt delivery.

> Interesting. I read this phrase more than once in the discussion of your
> patch. When will the to-do list be done ? 

Well of course you hear it more than once, we are getting _a lot_ of
interesting feedback. Forgive me if I actually take the time to wait
a day or two for most everyone's feedback to come in and carry out
recommendations properly. Don't worry, I won't hold the changes too
long :)

> I'm impressed of your sudden time constraints awareness. Allowing 8192
> bytes of user event size, string printing with varags and XML tracing
> is not biting you ? 

Use of these is by definition lacking performance. It's there because
some people actually need it. Again, if you have some concrete advice
as to what needs to be changed, we'll gladly hear it.

> If you only store the low 32 bit of TSC you have a valid timeline when
> you are able to do the math in your postprocessor. Depending on the
> speed 16 bit are enough.

We're already storing the low 32 bit of the TSC where available.

> A ring buffer is not stupid at all. I have implemented tracing with ring
> buffers already, so I know the limitations and the PITA. 
> 
> OTOH ringbuffers _ARE_ lockless, constant time comsuming and allow you
> to implement the splitting and related functionality in userspace
> postprocessing, which has to be done anyway. 

We've had this debate before if you're interested to dig in the archives.
Here's a suggested implementation by Ingo:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103273730326318&w=2
And here are some reasons why this is incomplete:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103273967727564&w=2

> Do not tell me that streaming out data in a constant stream is worse
> than putting them into nodes of a filesystem and retrieving them from
> there.
> 
> Setting up a simple /dev/proc/sys interface and do a 
> cat /xxx/trace/cpuX >file/interface/whatever
> is not less efficient than the conversion of your data into a file.

Clearly you haven't read the implementation and/or aren't familiar with
its use. Usually, what you want to do is open(), mmap(), write(), there
is no "conversion" to a file. The filesystem abstraction is just a
namespace holder for us.

> Sure, I have to grab stuff out of a filesystem instead of simply doing
> for (....)
> 	sendserial(buffer[i]);
> 
> I know you can provide a nice function for doing so, but it will take
> another xxx kB of code instead of a 10 line simple solution. 

Again, you haven't read the implementation and aren't familiar with its
mechanics. Basically, you should just need to provide the pointer to
the begining of the relayfs buffer and do what you suggest above.

> Haha. If you have eventstamps and timestamps (even the jiffie + event
> based ones) nothing is hard to interpret. I guess the ethereal guys are
> rolling on the floor and laughing. 
> 
> The kernel is not the place to fix your postprocessing problems. Sure
> you have to do more complicated stuff, but you move the burden from
> kernel to a place where it does not hurt.
> 
> What's hard on interpreting and filtering a stream of data ?

Umm, not having enough information in order for interpreting the data?

There is no postprocessing done in the kernel, please stop making
false claims. What is done is provide enough information to allow
simpler post-processing later. Spliting the stream on a per-cpu basis
is certainly not without merit. Plus, there is no cost in doing this,
each channel has a different ID and logging to it does not require
any form of string lookup (currently we're just checking a table to
make sure the ID is valid, but Roman suggested we dump this for pure
pointers instead and we've added this to our list.)

> What's complicated ? In case I want to have timing related tracing which
> includes printks, then storing the address where the printk is coming
> from is enough instead of a various length string. Storing some args in
> binary form with this address should not be too hard to achieve.
> 
> Again its a postprocessing problems. 

Sorry, I don't see how this is relevant to either relayfs or LTT.

> And therefor I need strings, HEX strings, XML ? A simple number and the
> data behind gives you all you need.
> 
> Again its a postprocessing problems. 

But that's exactly what we got already. Here's from include/linux/ltt-events.h:
/* Custom declared events */
/* ***WARNING*** These structures should never be used as is, use the
   provided custom event creation and logging functions. */
typedef struct _ltt_new_event {
	/* Basics */
	u32 id;					/* Custom event ID */
	char type[LTT_CUSTOM_EV_TYPE_STR_LEN];	/* Event type description */
	char desc[LTT_CUSTOM_EV_DESC_STR_LEN];	/* Detailed event description */

	/* Custom formatting */
	u32 format_type;			/* Type of formatting */
	char form[LTT_CUSTOM_EV_FORM_STR_LEN];	/* Data specific to format */
} LTT_PACKED_STRUCT ltt_new_event;
typedef struct _ltt_custom {
	u32 id;			/* Event ID */
	u32 data_size;		/* Size of data recorded by event */
	void *data;		/* Data recorded by event */
} LTT_PACKED_STRUCT ltt_custom;

The ltt_new_event struct is only used once when the event is created.
Everything afterwards goes through an ltt_custom struct.

> Sure I'm aware that I can switch off all, but I can not deselect
> specific tracepoints during compile time to reduce the overhead. 
> 
> If I want to have custom tracepoints for my specific problem, then why I
> need the overhead of the other stuff ?

Ah, ok, you weren't as clear earlier. I don't see anything that precludes
us from adding the appropriate kconfig/#ifdef machinery to allow this. I'll
gladly take a patch from you.

> If you consider the above example, which is taken of your code, as sane
> then we can stop talkin about this.

That's not the point. You're bending backwards as far as you can reach
trying to raise as much mud as you can, but when pressed for actual
constructive input you hide behind a strawman argument. If you don't
have anything to say, then stop whining.

> Karim, please do not use the FUD argument. 
> 
> I do not doubt that it is  efficient from your point of view. 
> 
> But if short tests show this and I'm able to prove that numbers, you can
> barely deny that the scaling of 300MHZ PIII to ARM 74MHz SoC is wrong.
> It's simple math. 

I like calling things by their name. You can say what you will but I
will bet on the casual observer's sense of reality to differentiate
between your "short tests" and the rounds of benchmarks we ran and
the results that we documented.

> Yes, the "you would anyway have to go down the same path we have"
> argument really scares me away from doing so. 
> 
> I don't buy this kind of arguments. 

You have every right to contest what I'm saying. But if you do wish
to enforce that right, it seems to me that I have the right to not
have my time wasted by having to parse through your unnecessary
ad-hominem attacks. There are justifications for our choices, and I
will do my best to present them to you.

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

  parent reply	other threads:[~2005-01-15  1:24 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                           ` 2.6.11-rc1-mm1 Karim Yaghmour
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       ` Karim Yaghmour [this message]
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=41E86E6F.6090004@opersys.com \
    --to=karim@opersys.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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