Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: Hi, I have some doubt about the value of #define CACHE_LINE_SIZE (urcu/arch_x86.h) that is set to 128. After some research and looking on my computer, the x86 architecture seems to have most of the time 64 bytes size. On my i7 920, here's

Re: [ltt-dev] [PATCH] Updates Changelog for UST version 0.6

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: Signed-off-by: David Goulet david.gou...@polymtl.ca Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- ChangeLog | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 02:51 PM, Mathieu Desnoyers wrote: * David Goulet (david.gou...@polymtl.ca) wrote: Hi, I have some doubt about the value of #define CACHE_LINE_SIZE (urcu/arch_x86.h) that is set to 128. After some research and looking on my

Re: [ltt-dev] [PATCH] Changes malloc to zmalloc for libust

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: Signed-off-by: David Goulet david.gou...@polymtl.ca --- libust/buffers.c|4 ++-- libust/marker.c |6 +++--- libust/tracectl.c |4 ++-- libust/tracepoint.c |8 4 files changed, 11 insertions(+), 11

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread David Goulet
On 10-08-17 03:45 PM, Mathieu Desnoyers wrote: * David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 02:51 PM, Mathieu Desnoyers wrote: * David Goulet (david.gou...@polymtl.ca) wrote: Hi, I have some doubt about the value of #define CACHE_LINE_SIZE (urcu/arch_x86.h) that is set to

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Alexandre Montplaisir
On 10-08-17 03:54 PM, Mathieu Desnoyers wrote: * Mathieu Desnoyers (comp...@krystal.dyndns.org) wrote: * David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 02:51 PM, Mathieu Desnoyers wrote: * David Goulet (david.gou...@polymtl.ca) wrote: Hi, I have some

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 03:45 PM, Mathieu Desnoyers wrote: [...] Yes. The performance degradation caused by cache-line bouncing is _way_ worse than extra cache pressure. There is something I don't understand here. Correct me if (most likely) I am wrong.

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Mathieu Desnoyers
* Alexandre Montplaisir (alexandre.montplai...@polymtl.ca) wrote: On 10-08-17 03:54 PM, Mathieu Desnoyers wrote: [...] Oh, and by the way, given that these are arrays made of one variable per cpu, the extra space allocated will not consume extra cache lines in any of the CPU. We're just

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread David Goulet
On 10-08-17 04:24 PM, Mathieu Desnoyers wrote: * David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 03:45 PM, Mathieu Desnoyers wrote: [...] Yes. The performance degradation caused by cache-line bouncing is _way_ worse than extra cache pressure. There is something I don't

[ltt-dev] [PATCH] Changes malloc to zmalloc

2010-08-17 Thread David Goulet
For libustcomm, libustd, ustctl and ustd. Signed-off-by: David Goulet david.gou...@polymtl.ca --- libustcomm/multipoll.c |4 ++-- libustcomm/ustcomm.c | 22 +++--- libustd/libustd.c |6 +++--- ustctl/ustctl.c|2 +- ustd/ustd.c|7

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 04:24 PM, Mathieu Desnoyers wrote: * David Goulet (david.gou...@polymtl.ca) wrote: On 10-08-17 03:45 PM, Mathieu Desnoyers wrote: [...] Yes. The performance degradation caused by cache-line bouncing is _way_ worse than extra cache

Re: [ltt-dev] liburcu cache line size

2010-08-17 Thread Mathieu Desnoyers
* Alexandre Montplaisir (alexandre.montplai...@polymtl.ca) wrote: On 10-08-17 04:27 PM, Mathieu Desnoyers wrote: * Alexandre Montplaisir (alexandre.montplai...@polymtl.ca) wrote: On 10-08-17 03:54 PM, Mathieu Desnoyers wrote: [...] Oh, and by the way, given that these are

Re: [ltt-dev] [PATCH] Changes malloc to zmalloc

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: For libustcomm, libustd, ustctl and ustd. Signed-off-by: David Goulet david.gou...@polymtl.ca --- libustcomm/multipoll.c |4 ++-- libustcomm/ustcomm.c | 22 +++--- libustd/libustd.c |6 +++---

[ltt-dev] Assert error ust strncpy

2010-08-17 Thread David Goulet
Hi Mathieu, I have a quite big problem since the new patch with strncpy for UST. With a high number of events (10 +), I got this : buffers.h:525: ust_buffers_write: Assertion `buf_offset + len buf-chan-subbuf_size*buf-chan-subbuf_cnt' failed. At that line in (libust/buffers.h) you have

Re: [ltt-dev] Assert error ust strncpy

2010-08-17 Thread Mathieu Desnoyers
* David Goulet (david.gou...@polymtl.ca) wrote: Hi Mathieu, I have a quite big problem since the new patch with strncpy for UST. With a high number of events (10 +), I got this : buffers.h:525: ust_buffers_write: Assertion `buf_offset + len buf-chan-subbuf_size*buf-chan-subbuf_cnt'

[ltt-dev] [PATCH UST] UST strncpy assert fix

2010-08-17 Thread Mathieu Desnoyers
fix off by one in strncpy and write asserts(). Shows only when the event reserved fits the exact end of buffer. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- libust/buffers.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Index: ust/libust/buffers.h

[ltt-dev] [RFC PATCH 08/20] Add inline memcpy

2010-08-17 Thread Mathieu Desnoyers
Support __HAVE_ARCH_INLINE_MEMCPY. Start with a fall-back to memcpy(). Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- include/linux/string.h |3 +++ 1 file changed, 3 insertions(+) Index: linux.trees.git/include/linux/string.h

[ltt-dev] [RFC PATCH 03/20] Idle notifier standardization

2010-08-17 Thread Mathieu Desnoyers
Move idle notifiers into arch-agnostic code. Adapt x86 64 accordingly to call the new architecture-agnostic notifiers rather than its own. Other architectures are still todo. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- arch/x86/include/asm/idle.h |7 ---

[ltt-dev] [RFC PATCH 00/20] Generic Ring Buffer Library (v2)

2010-08-17 Thread Mathieu Desnoyers
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

[ltt-dev] [RFC PATCH 18/20] Ring buffer record iterator

2010-08-17 Thread Mathieu Desnoyers
Implements per-cpu-local iterator and channel-wide iterator. Implements a read() file operation based on these iterators. These iterators or the read() file operation can be used by ring buffer clients. The channel-wide iterator implements timestamp-ordered fusion merge of per-cpu channels using

[ltt-dev] [RFC PATCH 19/20] Ring buffer library: basic API (v2)

2010-08-17 Thread Mathieu Desnoyers
Changelog since v1: * Use basic api configuration structure to specify the ring buffer behavior rather than duplicating API members needlessly. Offer basic APIs for pre-built ring buffer clients: - Global Overwrite - Global Discard - Per-cpu Overwrite with channel-wide iterator - Per-cpu

[ltt-dev] [RFC PATCH 02/20] Notifier atomic call chain notrace

2010-08-17 Thread Mathieu Desnoyers
Being able to use the atomic notifier from cpu idle entry to ensure the tracer flush the last events in the current subbuffer requires the rcu read-side to be marked notrace. Also apply to the the die notifier. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com Reviewed-by: Paul E.

[ltt-dev] [RFC PATCH 10/20] Trace clock - build standalone

2010-08-17 Thread Mathieu Desnoyers
Building the trace clock without CONFIG_TRACING enabled is useful for the ring buffer library sample client. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- kernel/Makefile|1 + kernel/trace/Kconfig |3 +++ kernel/trace/trace_clock.c |3 +++ 3

[ltt-dev] [RFC PATCH 20/20] Ring buffer: benchmark simple API (v2)

2010-08-17 Thread Mathieu Desnoyers
Changelog since v1: * Adapt to Basic API v2. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- kernel/trace/Makefile |8 kernel/trace/lib_global_discard_ring_buffer_benchmark.c | 14

[ltt-dev] [RFC PATCH 12/20] Ring buffer backend

2010-08-17 Thread Mathieu Desnoyers
Ring buffer backend, with page allocation, data read/write API, cpu hotplug management. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- include/linux/ringbuffer/backend.h | 141 + include/linux/ringbuffer/backend_internal.h | 418 +++

[ltt-dev] [RFC PATCH 05/20] Poll : add poll_wait_set_exclusive

2010-08-17 Thread Mathieu Desnoyers
Executive summary: poll_wait_set_exclusive : set poll wait queue to exclusive Sets up a poll wait queue to use exclusive wakeups. This is useful to wake up only one waiter at each wakeup. Used to work-around thundering herd problem. Detail: * Problem description : In the ring buffer poll()

[ltt-dev] [RFC PATCH 17/20] Ring buffer benchmark library

2010-08-17 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- kernel/trace/Kconfig |1 kernel/trace/Makefile|1 kernel/trace/lib_ring_buffer_benchmark.c | 659 +++ 3 files changed, 661 insertions(+) Index:

[ltt-dev] [RFC PATCH 14/20] Ring buffer library - documentation (v2)

2010-08-17 Thread Mathieu Desnoyers
Changelog since v1: * Update documentation matching new basic API. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com --- Documentation/ring-buffer/ring-buffer-design.txt | 78 +++ Documentation/ring-buffer/ring-buffer-usage.txt | 254 +++ 2 files

Re: [ltt-dev] [RFC PATCH 01/20] Create generic alignment API (v8)

2010-08-17 Thread Mathieu Desnoyers
* Kirill A. Shutemov (kir...@shutemov.name) wrote: Index: linux.trees.git/include/linux/align.h === --- /dev/null 1970-01-01 00:00:00.0 + +++ linux.trees.git/include/linux/align.h 2010-08-17