Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2)
@ 2010-08-17 23:16 Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
                   ` (19 more replies)
  0 siblings, 20 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


This patchset implements a generic ring buffer library, which provides a very
efficient, yet flexible, API to both tracers and drivers to move large amounts
of data within and outside of kernel-space.

It comes as a response to Linus mandate from the 2008 Kernel Summit. In May
2010, Steven Rostedt, author of the Ftrace ring buffer, came forward and asked
me if I could handle this task, which results in this patchset. In addition to
come up with a common ring buffer, this patchset takes into account the pressing
industry need for a blazingly fast, and reliable, ring buffer. Tracing, as we
know, is a very resource-hungry activity, which should be kept to small
percentage of system's resources in order to be useful on heavy workloads, which
are the most likely to reproduce bugs and performance problems.

It is derived from the LTTng ring buffer, heavily cleaned up and librarified to
become a generic kernel ring buffer. The flexibility provided by this library
does _not_ come at the expense of performance, because each library client
provides its own constant "configuration" structure passed along to each
fast-path inline function, therefore letting the compiler perform code selection
statically. The slow paths are shared amongst all clients, which allows overall
code size savings as the number of library clients increases.

Changelog since v1:
* Clean up "simple ring buffer API" following feedback received at LinuxCon.
* Allow read-side to take a snapshot of the buffers and walk sub-buffer in
  reverse, from newest to oldest (idea from Peter Zijlstra and Masami Hiramatsu)
* Allow a buffer snapshot to be read more than once (this should please Steven
  Rostedt). This could be used to implement ftrace ring buffer "peek" if needed.
* Rebase on kernel 2.6.36-rc1-tip


* History

As far back as May 2005, LTTng implemented its ring buffer from scratch,
learning lessons from K42, RelayFS and LTT. It became lock-less in October 2005.
It has been widely used by the industry and shipped with many embedded and
real-time distributions. Since then, Ftrace (2008, lock-less in 2009) and Perf
(2010) implemented their own ring buffer.

Ftrace ring buffer offers lock-less, per-cpu buffers, with good performance (at
least on x86, however Tim Bird reported that the amount of local_t operations on
the fast-path made did perform poorly on ARM). The main problems seen with this
ring buffer are linked with its complexity level, mainly caused by lack of
abstraction between the ring buffer format, locking, memory backend, and
time-stamping. Steven finally asked me to try coming forward with a generic ring
buffer in this post: http://lwn.net/Articles/389199/

Perf ring-buffer has lately seen some improvement regarding speed following
criticism from Steven and myself. Perf ring-buffer scheme was benchmarked by
Steven Rostedt, showing it was about 4 times slower than Ftrace and LTTng at
that point. Perf performance improved since then, but the monolithic nature
of its ring buffer, being inherently tied to the tracer, and the fact that it
does not implement a flight recorder mode required significant effort to come up
with numbers comparable with other ring buffers.

The state of the Perf ring buffer code is as we could expect from code having
being heavily modified in a short amount of time (a quick glance at the code
shows at least one clearly missing memory barrier in perf_output_put_handle() in
the 2.6.35-rc4-tip tree). The Perf user-space ABI comes as a pain point, as it
ties the ring buffer implementation to the control ABI exported to user-space
through a mmap'd page.  The user-space perf tool therefore interacts with the
kernel through reads and writes in a shared memory region without using system
calls.  This direct link between the kernel data structures and the user-space
ABI makes most abstractions impracticable and heavily constrains kernel-level
ring buffer design.


* Benchmarks

  * Throughput

These results shows the time it takes to write an entry to each ring buffer
implementation (generic library, Ftrace, Perf). The test is an adaptation of
kernel/trace/ring_buffer_benchmark.c, which stress-tests the ring buffer by
writing and reading data to/from it for 10 seconds.

  Setup:
  - Clock source:
    - trace_clock_local() for Generic Ring Buffer Library and Ftrace
    - perf_clock() for Perf
  - 1MB per-cpu buffers
  - 4 byte payload/event (contains the cpu id)
  - A single producer thread
  - On a Xeon 2.0GHz E5405, dual-socket, 4 cores/socket (8 cores total)
  - Using Ftrace ring_buffer_benchmark (adapted to the Ring Buffer Library)
    - producer_fifo=10
  - Kernel: 2.6.35-rc4-tip

    * Overwrite (flight-recorder) mode

Ring Buffer Library:       83 ns/entry (512kB sub-buffers, no reader)
                           84 ns/entry (128kB sub-buffers, no reader)
                           86 ns/entry (4kB sub-buffers,   no reader)
                           89 ns/entry (512kB sub-buffers: read 0.3M entries/s)
                          111 ns/entry (128kB sub-buffers: read 1.9M entries/s)
                          199 ns/entry (4kB sub-buffers:   read 4.8M entries/s)
   Reader wake-up: performed by per-cpu timer each 100ms.

Ftrace Ring Buffer:       103 ns/entry (no reader)
                          148 ns/entry (read by page:      read 6.6M entries/s)
                          187 ns/entry (read by event:     read 0.4M entries/s)
   Reader wake-up: each 100 events written (arbitrarily chosen by benchmark)

Perf record               (flight recorder mode unavailable)


    * Discard (producer-consumer) mode

Generic Ring Buffer Library:           (128kB sub-buffers: read 2.8M entries/s)

(in 10s)
Written:              28020143
Lost:                 28995757
Read:                 28017426

                           96 ns/entry discarded
                          257 ns/entry written

Perf record:
    (using patch from post http://lkml.org/lkml/2010/5/20/313)
# modprobe ring_buffer_benchmark producer_fifo=10 trace_event=1
# perf record -e rb_bench:rb_benchmark -c1 -a sleep 30

[ perf record: Woken up 169 times to write data ]
[ perf record: Captured and wrote 1623.336 MB perf.data (~70924640 samples) ]

# cat /debug/tracing/trace
   Note: output of the benchmark module is incorrect, because it does not take
into account events discarded by Perf.

Using the perf output approximation of 70924640 entries written in 30 seconds
leads to:
                         423 ns/entry (read: 2.3M entries/s)

Note that these numbers are based on the perf event approximation output (based
on a 24 bytes/entry estimation) rather than the benchmark module count due to
the inaccuracy discussed earlier.


  * Scalability

    * Generic Ring Buffer Library

I modified the ring buffer benchmark module for the "basic API" of the ring
buffer library (pre-built clients) to support multiple writer threads. The
following test uses 1MB per-cpu buffers (128kB sub-buffers) with local per-cpu
read iterators. It does not use any time-stamp; we notice that the numbers are
quite close to those of the throughput benchmark section above, meaning that the
extra overhead of the basic API compensates for the removal of
trace_clock_local() calls.

1 writer thread :  83 ns CPU time/record
2 writer threads: 116 ns CPU time/record
4 writer threads: 116 ns CPU time/record
8 writer threads: 118 ns CPU time/record

So basically the write-side scales almost linearly with the number of cores,
with the exception of L2 cache hits. This is because we are using 1MB per-core
buffers; we therefore hit the L2 cache shared amongst pairs of cores.

Saving a time-stamp taken with trace_clock() with each event (generic library
per-cpu buffers with support for channel-wide iterator) moves the scalability
drop point at 4 writer threads. The higher overhead and scalability change is
caused by the use of trace_clock() rather than trace_clock_local():

1 writer thread : 191 ns CPU time/record
2 writer threads: 189 ns CPU time/record
4 writer threads: 260 ns CPU time/record
8 writer threads: 265 ns CPU time/record


    * Ftrace

With a similar benchmark module, with time-stamps taken with
trace_clock_local(), Ftrace gives:

1 writer thread : 104 ns CPU time/record
2 writer threads: 165 ns CPU time/record
4 writer threads: 146 ns CPU time/record
8 writer threads: 153 ns CPU time/record


  * Formal Verification with Model-Checking

In addition to thorough testing, the Ring Buffer Library lock-less buffering
algorithm has been modeled and checked for races using the SPIN verifier on a
model detecting concurrent memory accesses in for all execution paths. This
model covers all the ring-buffer corner-cases. Note that this model assumes a
sequentially coherent machine; therefore memory barriers should be carefully
reviewed. I plan on enhancing this model with memory ordering awareness in the
future, but just did not have the time on my hand to tackle this task yet.

Even though it does not take away the risk of having discrepancy between the
implementation and the actual implementation and behavior on real hardware, this
additional level of formal verification provides a good level of confidence in
the ring buffer algorithm reliability.

Feedback is welcome,

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
                     ` (3 more replies)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace Mathieu Desnoyers
                   ` (18 subsequent siblings)
  19 siblings, 4 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: create-generic-alignment-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/03b2937e/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-18  0:00   ` Kirill A. Shutemov
  2010-08-18  1:25   ` Steven Rostedt
  3 siblings, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: create-generic-alignment-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/03b2937e/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: create-generic-alignment-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/03b2937e/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization Mathieu Desnoyers
                   ` (17 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: notifier-atomic-call-chain-notrace.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/3f44ede1/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: notifier-atomic-call-chain-notrace.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/3f44ede1/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: notifier-atomic-call-chain-notrace.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/3f44ede1/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32 Mathieu Desnoyers
                   ` (16 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: idle-notifier-standardize.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/f819fa64/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: idle-notifier-standardize.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/f819fa64/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: idle-notifier-standardize.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/f819fa64/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (2 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive Mathieu Desnoyers
                   ` (15 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: idle-notifier-x86_32.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/587b94c2/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32 Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: idle-notifier-x86_32.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/587b94c2/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32 Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: idle-notifier-x86_32.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/587b94c2/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (3 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32 Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick() Mathieu Desnoyers
                   ` (14 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: poll-wait-exclusive.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/c24edd81/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: poll-wait-exclusive.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/c24edd81/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: poll-wait-exclusive.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/c24edd81/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick()
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (4 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop() Mathieu Desnoyers
                   ` (13 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: prio-heap-remove-maximum-replace-cherrypick.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/ec485009/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick()
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick() Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: prio-heap-remove-maximum-replace-cherrypick.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/ec485009/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick()
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick() Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: prio-heap-remove-maximum-replace-cherrypick.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/ec485009/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop()
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (5 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick() Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 08/20] Add inline memcpy Mathieu Desnoyers
                   ` (12 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: kthread_kill_stop.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/0a9e1e28/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop()
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop() Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: kthread_kill_stop.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/0a9e1e28/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop()
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop() Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: kthread_kill_stop.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/0a9e1e28/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 08/20] Add inline memcpy
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (6 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop() Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 09/20] x86: " Mathieu Desnoyers
                   ` (11 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: inline-memcpy.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/fbbd2058/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 08/20] Add inline memcpy
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 08/20] Add inline memcpy Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: inline-memcpy.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/fbbd2058/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 08/20] Add inline memcpy
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 08/20] Add inline memcpy Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: inline-memcpy.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/fbbd2058/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 09/20] x86: inline memcpy
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (7 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 08/20] Add inline memcpy Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone Mathieu Desnoyers
                   ` (10 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: x86-inline-memcpy.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/7f10fe1c/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 09/20] x86: inline memcpy
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 09/20] x86: " Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: x86-inline-memcpy.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/7f10fe1c/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 09/20] x86: inline memcpy
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 09/20] x86: " Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: x86-inline-memcpy.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/7f10fe1c/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (8 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 09/20] x86: " Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2) Mathieu Desnoyers
                   ` (9 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: trace-clock-build-standalone.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/81f10a36/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: trace-clock-build-standalone.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/81f10a36/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: trace-clock-build-standalone.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/81f10a36/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2)
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (9 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 12/20] Ring buffer backend Mathieu Desnoyers
                   ` (8 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ftrace-ring-buffer.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/292ce06a/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2) Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ftrace-ring-buffer.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/292ce06a/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2) Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ftrace-ring-buffer.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/292ce06a/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 12/20] Ring buffer backend
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (10 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2) Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend Mathieu Desnoyers
                   ` (7 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring_buffer_backend.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/18c9d445/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 12/20] Ring buffer backend
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 12/20] Ring buffer backend Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring_buffer_backend.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/18c9d445/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 12/20] Ring buffer backend
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 12/20] Ring buffer backend Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring_buffer_backend.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/18c9d445/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (11 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 12/20] Ring buffer backend Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2) Mathieu Desnoyers
                   ` (6 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring_buffer_frontend.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/c0ef6580/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring_buffer_frontend.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/c0ef6580/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring_buffer_frontend.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/c0ef6580/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2)
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (12 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2) Mathieu Desnoyers
                   ` (5 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-documentation.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/8eb521d1/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2) Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-documentation.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/8eb521d1/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2) Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-documentation.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/8eb521d1/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2)
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (13 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2) Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample Mathieu Desnoyers
                   ` (4 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-vfs.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/9124a2a7/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2) Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-vfs.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/9124a2a7/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2) Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-vfs.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/9124a2a7/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (14 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2) Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library Mathieu Desnoyers
                   ` (3 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-client-sample.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/353f5988/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-client-sample.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/353f5988/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-client-sample.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/353f5988/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (15 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator Mathieu Desnoyers
                   ` (2 subsequent siblings)
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-benchmark-lib.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/c4a33627/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-benchmark-lib.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/c4a33627/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-benchmark-lib.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/c4a33627/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (16 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2) Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple " Mathieu Desnoyers
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-record-iterator.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/78b35290/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-record-iterator.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/78b35290/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-record-iterator.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/78b35290/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2)
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (17 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple " Mathieu Desnoyers
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-simple-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/679858c4/attachment.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2) Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-simple-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/679858c4/attachment-0001.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2) Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-simple-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/679858c4/attachment-0002.asc>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple API (v2)
  2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
                   ` (18 preceding siblings ...)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2) Mathieu Desnoyers
@ 2010-08-17 23:16 ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  19 siblings, 2 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-benchmark-simple-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20100817/aebb0846/attachment.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple API (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple " Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-benchmark-simple-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/aebb0846/attachment-0001.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple API (v2)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple " Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-17 23:16   ` Mathieu Desnoyers
  1 sibling, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-17 23:16 UTC (permalink / raw)


An embedded and charset-unspecified text was scrubbed...
Name: ring-buffer-benchmark-simple-api.patch
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20100817/aebb0846/attachment-0002.txt>


^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
  2010-08-17 23:16   ` Mathieu Desnoyers
@ 2010-08-18  0:00   ` Kirill A. Shutemov
  2010-08-18  1:05     ` Mathieu Desnoyers
  2010-08-18  1:25   ` Steven Rostedt
  3 siblings, 1 reply; 65+ messages in thread
From: Kirill A. Shutemov @ 2010-08-18  0:00 UTC (permalink / raw)


On Tue, Aug 17, 2010 at 07:16:20PM -0400, Mathieu Desnoyers wrote:
> Rather than re-doing the "alignment on a type size" trick all over again at
> different levels, import the "ltt_align" from LTTng into kernel.h and make this
> available to everyone. Renaming to:
> 
> - object_align()
> - object_align_floor()
> - offset_align()
> - offset_align_floor()
> 
> Changelog since v7:
> - Add missing include/linux/Kconfig header-y.
> 
> Changelog since v6:
> - Adapt to changes introduced by
>   commit a79ff731a1b277d0e92d9453bdf374e04cec717a
> - Use __alignof__() instead of sizeof() to support compound types.
> 
> Changelog since v5:
> - moved alignment apis to a separate header file so that it is possible
>   to use them from other header files which are, for example, included
>   from kernel.h.
> 
> Changelog since v4:
> - add missing ( ) around parameters within object_align() and
>   object_align_floor().
> - More coding style cleanups to ALIGN() (checkpatch.pl is happy now).
> 
> Changelog since v3:
> - optimize object_align*() so fewer instructions are needed for alignment of
>   addresses known dynamically. Use the (already existing) "ALIGN()", and create
>   the "ALIGN_FLOOR()" macro.
> - While we are there, let's clean up the ALIGN() macros wrt coding style. e.g.
>   missing parenthesis around the first use of the "x" parameter in ALIGN().
> 
> Changelog since v2:
> - Fix object_align*(): should use object size alignment, not pointer alignment.
> 
> Changelog since v1:
> - Align on the object natural alignment
>     (rather than min(arch word alignment, natural alignment))
> 
> The advantage of separating the API in "object alignment" and "offset alignment"
> is that it gives more freedom to play with offset alignment. Very useful to
> implement a tracer ring-buffer alignment. (hint hint)
> 
> Typical users will use "object alignment", but infrastructures like tracers
> which need to perform alignment of statically known base+offsets will typically
> use "offset alignment", because it allows to align with respect to a base rather
> than to pass an absolute address.
> 
> We use "sizeof(object)" rather than "__alignof__()" object because alignof
> returns "recommended" object alignment for the architecture, which can be
> sub-optimal on some architectures. By ensuring alignment on the object size, we
> are sure to make the right choice.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> Signed-off-by: Alexander Shishkin <virtuoso at slind.org>
> CC: Russell King - ARM Linux <linux at arm.linux.org.uk>
> CC: linux-arm-kernel at lists.infradead.org
> CC: Imre Deak <imre.deak at nokia.com>
> CC: Jamie Lokier <jamie at shareable.org>
> CC: rostedt at goodmis.org
> CC: mingo at elte.hu
> CC: Alexey Dobriyan <adobriyan at gmail.com>
> ---
>  include/linux/Kbuild   |    1 
>  include/linux/align.h  |   56 +++++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/kernel.h |    8 -------
>  3 files changed, 58 insertions(+), 7 deletions(-)
>  create mode 100644 include/linux/align.h
> 
> Index: linux.trees.git/include/linux/align.h
> ===================================================================
> --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> +++ linux.trees.git/include/linux/align.h	2010-08-17 16:31:50.000000000 -0400
> @@ -0,0 +1,56 @@
> +#ifndef _LINUX_ALIGN_H
> +#define _LINUX_ALIGN_H
> +
> +#define __ALIGN_KERNEL(x, a)	__ALIGN_KERNEL_MASK((x), (typeof(x))(a) - 1)
                                                    ^^^
Unnecessary braces. And many below.

> +#define __ALIGN_KERNEL_MASK(x, mask) \
> +				(((x) + (mask)) & ~(mask))
> +
> +#ifdef __KERNEL__
> +
> +#include <linux/types.h>
> +
> +#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
> +#define __ALIGN_MASK(x, mask)	__ALIGN_KERNEL_MASK((x), (mask))
> +#define PTR_ALIGN(p, a)		((typeof(p)) ALIGN((unsigned long) (p), (a)))
> +#define ALIGN_FLOOR(x, a)	__ALIGN_FLOOR_MASK((x), (typeof(x)) (a) - 1)
> +#define __ALIGN_FLOOR_MASK(x, mask)	((x) & ~(mask))
> +#define PTR_ALIGN_FLOOR(p, a) \
> +			((typeof(p)) ALIGN_FLOOR((unsigned long) (p), (a)))
> +#define IS_ALIGNED(x, a)	(((x) & ((typeof(x)) (a) - 1)) == 0)
> +
> +/*
> + * Align pointer on natural object alignment. Object size must be power of two.
> + */
> +#define object_align(obj)	PTR_ALIGN((obj), __alignof__(*(obj)))
> +#define object_align_floor(obj)	PTR_ALIGN_FLOOR((obj), __alignof__(*(obj)))
> +
> +/**
> + * offset_align - Calculate the offset needed to align an object on its natural
> + *                alignment towards higher addresses.
> + * @align_drift:  object offset from an "alignment"-aligned address.
> + * @alignment:    natural object alignment. Must be non-zero, power of 2.
> + *
> + * Returns the offset that must be added to align towards higher
> + * addresses.
> + */
> +static inline size_t offset_align(size_t align_drift, size_t alignment)
> +{
> +	return (alignment - align_drift) & (alignment - 1);
> +}
> +
> +/**
> + * offset_align_floor - Calculate the offset needed to align an object
> + *                      on its natural alignment towards lower addresses.
> + * @align_drift:  object offset from an "alignment"-aligned address.
> + * @alignment:    natural object alignment. Must be non-zero, power of 2.
> + *
> + * Returns the offset that must be substracted to align towards lower addresses.
> + */
> +static inline size_t offset_align_floor(size_t align_drift, size_t alignment)
> +{
> +	return (align_drift - alignment) & (alignment - 1);
> +}
> +
> +#endif /* __KERNEL__ */
> +
> +#endif
> Index: linux.trees.git/include/linux/kernel.h
> ===================================================================
> --- linux.trees.git.orig/include/linux/kernel.h	2010-08-17 16:28:25.000000000 -0400
> +++ linux.trees.git/include/linux/kernel.h	2010-08-17 16:31:50.000000000 -0400
> @@ -4,8 +4,7 @@
>  /*
>   * 'kernel.h' contains some often-used function prototypes etc
>   */
> -#define __ALIGN_KERNEL(x, a)		__ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
> -#define __ALIGN_KERNEL_MASK(x, mask)	(((x) + (mask)) & ~(mask))
> +#include <linux/align.h>
>  
>  #ifdef __KERNEL__
>  
> @@ -39,11 +38,6 @@ extern const char linux_proc_banner[];
>  
>  #define STACK_MAGIC	0xdeadbeef
>  
> -#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
> -#define __ALIGN_MASK(x, mask)	__ALIGN_KERNEL_MASK((x), (mask))
> -#define PTR_ALIGN(p, a)		((typeof(p))ALIGN((unsigned long)(p), (a)))
> -#define IS_ALIGNED(x, a)		(((x) & ((typeof(x))(a) - 1)) == 0)
> -
>  #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
>  
>  /*
> Index: linux.trees.git/include/linux/Kbuild
> ===================================================================
> --- linux.trees.git.orig/include/linux/Kbuild	2010-08-17 16:28:25.000000000 -0400
> +++ linux.trees.git/include/linux/Kbuild	2010-08-17 16:32:30.000000000 -0400
> @@ -38,6 +38,7 @@ header-y += adfs_fs.h
>  header-y += affs_hardblocks.h
>  header-y += agpgart.h
>  header-y += aio_abi.h
> +header-y += align.h
>  header-y += apm_bios.h
>  header-y += arcfb.h
>  header-y += atalk.h
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
 Kirill A. Shutemov



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-18  0:00   ` Kirill A. Shutemov
@ 2010-08-18  1:05     ` Mathieu Desnoyers
  0 siblings, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-18  1:05 UTC (permalink / raw)


* Kirill A. Shutemov (kirill at shutemov.name) wrote:
> > Index: linux.trees.git/include/linux/align.h
> > ===================================================================
> > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > +++ linux.trees.git/include/linux/align.h	2010-08-17 16:31:50.000000000 -0400
> > @@ -0,0 +1,56 @@
> > +#ifndef _LINUX_ALIGN_H
> > +#define _LINUX_ALIGN_H
> > +
> > +#define __ALIGN_KERNEL(x, a)	__ALIGN_KERNEL_MASK((x), (typeof(x))(a) - 1)
>                                                     ^^^
> Unnecessary braces. And many below.

Good catch, thanks !

I also found some in:

Ring buffer backend
Ring buffer frontend

patches. I fixed them already, they should be OK in the next round.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
                     ` (2 preceding siblings ...)
  2010-08-18  0:00   ` Kirill A. Shutemov
@ 2010-08-18  1:25   ` Steven Rostedt
  2010-08-18  2:09     ` Mathieu Desnoyers
  3 siblings, 1 reply; 65+ messages in thread
From: Steven Rostedt @ 2010-08-18  1:25 UTC (permalink / raw)


On Tue, 2010-08-17 at 19:16 -0400, Mathieu Desnoyers wrote:

> +/*
> + * Align pointer on natural object alignment. Object size must be power of two.
> + */

Hmm, I wonder if we should add a compiler bug here too.

extern void __bug_obj_not_power_of_two(void);

({
	if ((sizeof(*obj) - 1) & sizeof(*obj))
		__bug_obj_not_power_of_two();
	PTR_ALIGN((obj), __alignof__(*(obj)));
})

> +#define object_align(obj)	PTR_ALIGN((obj), __alignof__(*(obj)))
> +#define object_align_floor(obj)	PTR_ALIGN_FLOOR((obj), __alignof__(*(obj)))
> +
> +/**
> + * offset_align - Calculate the offset needed to align an object on its natural
> + *                alignment towards higher addresses.
> + * @align_drift:  object offset from an "alignment"-aligned address.
> + * @alignment:    natural object alignment. Must be non-zero, power of 2.
> + *
> + * Returns the offset that must be added to align towards higher
> + * addresses.
> + */
> +static inline size_t offset_align(size_t align_drift, size_t alignment)
> +{
> +	return (alignment - align_drift) & (alignment - 1);
> +}
> +
> +/**
> + * offset_align_floor - Calculate the offset needed to align an object
> + *                      on its natural alignment towards lower addresses.
> + * @align_drift:  object offset from an "alignment"-aligned address.
> + * @alignment:    natural object alignment. Must be non-zero, power of 2.
> + *
> + * Returns the offset that must be substracted to align towards lower addresses.
> + */
> +static inline size_t offset_align_floor(size_t align_drift, size_t alignment)
> +{
> +	return (align_drift - alignment) & (alignment - 1);
> +}

I take it that theses functions can have variables passed to it for
alignment, thus a check wont help. Although, we could add a test for the
constant case.

-- Steve

> +






^ permalink raw reply	[flat|nested] 65+ messages in thread

* [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)
  2010-08-18  1:25   ` Steven Rostedt
@ 2010-08-18  2:09     ` Mathieu Desnoyers
  0 siblings, 0 replies; 65+ messages in thread
From: Mathieu Desnoyers @ 2010-08-18  2:09 UTC (permalink / raw)


* Steven Rostedt (rostedt at goodmis.org) wrote:
> On Tue, 2010-08-17 at 19:16 -0400, Mathieu Desnoyers wrote:
> 
> > +/*
> > + * Align pointer on natural object alignment. Object size must be power of two.
> > + */
> 
> Hmm, I wonder if we should add a compiler bug here too.
> 
> extern void __bug_obj_not_power_of_two(void);
> 
> ({
> 	if ((sizeof(*obj) - 1) & sizeof(*obj))
> 		__bug_obj_not_power_of_two();
> 	PTR_ALIGN((obj), __alignof__(*(obj)));
> })

[...]

Nevermind the "Object size must be power of two." part of the comment. That was
true when I first implemented the patch, where I used sizeof(), e.g.:

#define object_align(obj)       PTR_ALIGN(obj, sizeof(*(obj)))
#define object_align_floor(obj) PTR_ALIGN_FLOOR(obj, sizeof(*(obj)))

But given that we can expect structures and various objects to be passed as
parameters, __alignof__ is more appropriate. This is what this patch now
implements:

#define object_align(obj)       PTR_ALIGN(obj, __alignof__(*(obj)))
#define object_align_floor(obj) PTR_ALIGN_FLOOR(obj, __alignof__(*(obj)))

so we let gcc determine the appropriate alignment. It will automatically be a
power of two. I'll just update the comment.

[...]

> I take it that theses functions can have variables passed to it for
> alignment, thus a check wont help. Although, we could add a test for the
> constant case.

That's right. I could add something like:

  MAYBE_BUILD_BUG_ON_NOT_POWER_OF_2(alignment);

which will add a dependency on kernel.h (for MAYBE_BUILD_BUG_ON) and log2.h (for
is_power_of_2). I'll move the #include <linux/align.h> further down in kernel.h,
keeping it outside of #ifdef __KERNEL__.

To make sure this build test works when a constant is passed to offset_align or
offset_align_floor, I'll have to turn them into macros instead of static
inlines.

The next round will have a patch that adds "MAYBE_BUILD_BUG_ON_NOT_POWER_OF_2"
to kernel.h.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2010-08-18  2:09 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-17 23:16 [ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2) Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8) Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-18  0:00   ` Kirill A. Shutemov
2010-08-18  1:05     ` Mathieu Desnoyers
2010-08-18  1:25   ` Steven Rostedt
2010-08-18  2:09     ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 03/20] Idle notifier standardization Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 04/20] Idle notifier standardization x86_32 Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 06/20] Prio_heap: heap_remove(), heap_maximum(), heap_replace() and heap_cherrypick() Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 07/20] kthread: Add kthread_kill_stop() Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 08/20] Add inline memcpy Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 09/20] x86: " Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 11/20] Ftrace ring buffer renaming (v2) Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 12/20] Ring buffer backend Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 13/20] Ring buffer frontend Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2) Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 15/20] Ring buffer library - VFS operations (v2) Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 16/20] Ring buffer library - client sample Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2) Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16 ` [ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple " Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers
2010-08-17 23:16   ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox