public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Avi Kivity <avi@qumranet.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	systemtap-ml <systemtap@sources.redhat.com>,
	linux-btrace@vger.kernel.org
Subject: [RFC] LTTng merge plan
Date: Sun, 27 Jul 2008 20:54:05 -0400	[thread overview]
Message-ID: <20080728005405.GA7941@Krystal> (raw)
In-Reply-To: <488C49CC.8040800@qumranet.com>

* Avi Kivity (avi@qumranet.com) wrote:
> Mathieu Desnoyers wrote:
>
>  
>>> Yes, but the userspace side would collect the format strings as well 
>>> (just once) and could put them in the same file.  The aggregation is 
>>> portable across kernel versions.
>>>
>>>     
>>
>> Yes,
>>
>> LTTng does exactly all that.
>>
>>
>>   
>
> [snip goodies]
>
>> I'll be more than happy to answer your questions.
>>   
>
> What's the merge plan for this?
>

Hi Avi,

Thanks for asking. Given the amount of expectation from kernel
developers, distributions and users I have seen for kernel tracing at
this year's OLS, I think giving a detailed merge plan for my LTTng work
is appropriate.

Currently, it looks like :

In Ingo's trees :
- Tracepoints, scheduler tracepoints instrumentation, ftrace port to
  tracepoints
  - Should make it into 2.6.27 since ftrace needs those.
- Immediate Values (faster branch based on load immediate instruction)
  Useful for markers and tracepoints, but can also be used for any
  compiled-in code that has to be dynamically enabled.
  - Aims at 2.6.28
- Text Edit Lock : protection of kernel text modification with a mutex.
  Synchronises kprobes and immediate values.
  - Aims at 2.6.28

Short-term submission plan

In LTTng patchset
(http://ltt.polymtl.ca/lttng/patch-2.6.26-0.12.tar.bz2)

- Instrumentation
  - LTTng tracepoints
    - Used by LTTng, SystemTAP and usable specialized probes.
  - Port specific sets of tracepoints along with their current users
    - ftrace (port currently in Ingo's tree), KVM trace, blktrace.

- Data extraction
  - LTTng timestamping
     - Based on the CPU cycle counter when synchronized across CPUs.
     - Fallback on a simple cache-bouncing atomic counter if no
       synchronized fast time source is available. Basically, the idea
       is that having the correct event _order_ is more important than
       having an approximate time, because this "timestamp" is used to
       reorder events which are written in per-CPU buffers. Time updates
       can always be recorded as an event in the trace to get an idea of
       the kernel time flow.
  - LTTng trace management
    - netlink interface to start/stop tracing and set the buffer sizes.
      - Supports multiple channels (high/medium/low event rate).
        Metadata (marker types, list of interrupt handlers...) can be
        exported in low event rate channels.
      - Supports flight recorder mode (overwriting oldest buffer data),
        normal mode (writes to disk, drops events if buffer is full) or
        hybrid, or mixed, mode, where the high event rate buffers only
        are in flight recorder mode.
  - Data relay
    - Atomic buffering mechanism which does not call into kernel
      primitives except preempt disable. Only touches variables
      atomically, does not use any lock. Aims at having minimal
      intrusiveness and allowing the largest code coverage (thus not
      calling kernel code).
  - LTTng marker control
    - Currently a /proc/ltt interface with read and write operations to
      list markers and connect LTTng probe to individual markers,
      specifying in which channel to send the data (I know, should
      probably belong to /sys instead, comments welcome) It's not part
      of the core marker infrastructure because it depends both on
      markers and on the LTTng trace management. It's also responsible
      for allocating a numeric ID to a marker which is guaranteed to be
      unique as long as there is at least one active trace.


Medium-term submission plan

In LTTng patchset

- Instrumentation
  - Userspace tracing interface
    - Allow userspace to declare tracepoints and/or markers
    - Provide a data extraction interface to collect the tracing data.
      - More work needed in this area.
  - LTTng statedump
    - Exports the kernel data structures to the trace buffers at trace
      start. List interrupts, system calls, threads, memory maps, ... It
      does not use /proc because :
        1 - /proc has nasty races which makes the information "generally
        correct" but not more.
        2 - /proc exports the information in text format, which is not
        as compact as LTTng binary format.

Longer term wishlist
- GCC support for static branch patching
  - Improvement on the immediate values for dynamic code activation

A bit more information is available in the slides I just presented at
OLS at :

http://ltt.polymtl.ca/slides/desnoyers-talk-ols2008.pdf

I'll gladly answer to questions/comments.

Mathieu


-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2008-07-28  0:59 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 15:57 [patch 0/4] Port KVM-trace to tracepoints Mathieu Desnoyers
2008-07-17 15:57 ` [patch 1/4] kvm move VMCS Encodings to system headers Mathieu Desnoyers
2008-07-17 15:57 ` [patch 2/4] kvm move VMCS read " Mathieu Desnoyers
2008-07-17 15:57 ` [patch 3/4] KVM move register read-write " Mathieu Desnoyers
2008-07-17 15:57 ` [patch 4/4] KVM-trace port to tracepoints Mathieu Desnoyers
2008-07-17 16:49   ` Jan Kiszka
2008-07-17 17:28     ` Mathieu Desnoyers
2008-07-22 16:04       ` Jan Kiszka
2008-07-22 18:46         ` Avi Kivity
2008-07-23  7:49           ` Peter Zijlstra
2008-07-23  8:08             ` Avi Kivity
2008-07-23  8:55               ` Peter Zijlstra
2008-07-23  9:32                 ` Avi Kivity
2008-07-23  9:53                   ` Peter Zijlstra
2008-07-23 13:15                     ` Mathieu Desnoyers
2008-07-23 10:03                 ` Christoph Hellwig
2008-07-23 10:08                   ` Avi Kivity
2008-07-23 10:13                     ` Christoph Hellwig
2008-07-23 13:20               ` Mathieu Desnoyers
2008-07-17 16:52   ` Anthony Liguori
2008-07-17 17:04     ` Mathieu Desnoyers
2008-07-22 18:42 ` [patch 0/4] Port KVM-trace " Avi Kivity
2008-07-22 19:16   ` Frank Ch. Eigler
2008-07-22 19:31     ` Avi Kivity
2008-07-22 19:54       ` Frank Ch. Eigler
2008-07-22 22:12       ` [patch 0/4] Port KVM-trace to tracepoints -> LTTng ? Mathieu Desnoyers
2008-07-27 10:11         ` Avi Kivity
2008-07-28  0:54           ` Mathieu Desnoyers [this message]
2008-07-29 16:18             ` [RFC] LTTng merge plan Frank Ch. Eigler
2008-07-29 17:01               ` Mathieu Desnoyers
     [not found]                 ` <20080729211543.GB17097@redhat.com>
2008-07-29 22:41                   ` module-placed markers/tracepoints Mathieu Desnoyers
2008-07-29 23:01                     ` Frank Ch. Eigler
2008-07-29 23:19                       ` Mathieu Desnoyers
2008-07-30  1:40                     ` Rusty Russell
2008-07-30  2:27                       ` [PATCH] Module : call synchronize_sched() between module exit() and free Mathieu Desnoyers
2008-07-30  3:04                         ` Rusty Russell
2008-07-30  4:05                           ` Mathieu Desnoyers
2008-07-30 11:40                         ` Frank Ch. Eigler
2008-07-30 14:09                           ` Mathieu Desnoyers
2008-07-31  0:54                             ` Rusty Russell

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=20080728005405.GA7941@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=avi@qumranet.com \
    --cc=fche@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-btrace@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=systemtap@sources.redhat.com \
    --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