<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/trace/ring_buffer.c, branch v2.6.30.8</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ring-buffer: Fix advance of reader in rb_buffer_peek()</title>
<updated>2009-08-16T21:19:16+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2009-08-12T15:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46dbb6a2b732f337f11a981eb0d994582405c03e'/>
<id>46dbb6a2b732f337f11a981eb0d994582405c03e</id>
<content type='text'>
Backport for 2.6.30-stable of:

 469535a ring-buffer: Fix advance of reader in rb_buffer_peek()

When calling rb_buffer_peek() from ring_buffer_consume() and a
padding event is returned, the function rb_advance_reader() is
called twice. This may lead to missing samples or under high
workloads to the warning below. This patch fixes this. If a padding
event is returned by rb_buffer_peek() it will be consumed by the
calling function now.

Also, I simplified some code in ring_buffer_consume().

------------[ cut here ]------------
WARNING: at /dev/shm/.source/linux/kernel/trace/ring_buffer.c:2289 rb_advance_reader+0x2e/0xc5()
Hardware name: Anaheim
Modules linked in:
Pid: 29, comm: events/2 Tainted: G        W  2.6.31-rc3-oprofile-x86_64-standard-00059-g5050dc2 #1
Call Trace:
[&lt;ffffffff8106776f&gt;] ? rb_advance_reader+0x2e/0xc5
[&lt;ffffffff81039ffe&gt;] warn_slowpath_common+0x77/0x8f
[&lt;ffffffff8103a025&gt;] warn_slowpath_null+0xf/0x11
[&lt;ffffffff8106776f&gt;] rb_advance_reader+0x2e/0xc5
[&lt;ffffffff81068bda&gt;] ring_buffer_consume+0xa0/0xd2
[&lt;ffffffff81326933&gt;] op_cpu_buffer_read_entry+0x21/0x9e
[&lt;ffffffff810be3af&gt;] ? __find_get_block+0x4b/0x165
[&lt;ffffffff8132749b&gt;] sync_buffer+0xa5/0x401
[&lt;ffffffff810be3af&gt;] ? __find_get_block+0x4b/0x165
[&lt;ffffffff81326c1b&gt;] ? wq_sync_buffer+0x0/0x78
[&lt;ffffffff81326c76&gt;] wq_sync_buffer+0x5b/0x78
[&lt;ffffffff8104aa30&gt;] worker_thread+0x113/0x1ac
[&lt;ffffffff8104dd95&gt;] ? autoremove_wake_function+0x0/0x38
[&lt;ffffffff8104a91d&gt;] ? worker_thread+0x0/0x1ac
[&lt;ffffffff8104dc9a&gt;] kthread+0x88/0x92
[&lt;ffffffff8100bdba&gt;] child_rip+0xa/0x20
[&lt;ffffffff8104dc12&gt;] ? kthread+0x0/0x92
[&lt;ffffffff8100bdb0&gt;] ? child_rip+0x0/0x20
---[ end trace f561c0a58fcc89bd ]---

Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backport for 2.6.30-stable of:

 469535a ring-buffer: Fix advance of reader in rb_buffer_peek()

When calling rb_buffer_peek() from ring_buffer_consume() and a
padding event is returned, the function rb_advance_reader() is
called twice. This may lead to missing samples or under high
workloads to the warning below. This patch fixes this. If a padding
event is returned by rb_buffer_peek() it will be consumed by the
calling function now.

Also, I simplified some code in ring_buffer_consume().

------------[ cut here ]------------
WARNING: at /dev/shm/.source/linux/kernel/trace/ring_buffer.c:2289 rb_advance_reader+0x2e/0xc5()
Hardware name: Anaheim
Modules linked in:
Pid: 29, comm: events/2 Tainted: G        W  2.6.31-rc3-oprofile-x86_64-standard-00059-g5050dc2 #1
Call Trace:
[&lt;ffffffff8106776f&gt;] ? rb_advance_reader+0x2e/0xc5
[&lt;ffffffff81039ffe&gt;] warn_slowpath_common+0x77/0x8f
[&lt;ffffffff8103a025&gt;] warn_slowpath_null+0xf/0x11
[&lt;ffffffff8106776f&gt;] rb_advance_reader+0x2e/0xc5
[&lt;ffffffff81068bda&gt;] ring_buffer_consume+0xa0/0xd2
[&lt;ffffffff81326933&gt;] op_cpu_buffer_read_entry+0x21/0x9e
[&lt;ffffffff810be3af&gt;] ? __find_get_block+0x4b/0x165
[&lt;ffffffff8132749b&gt;] sync_buffer+0xa5/0x401
[&lt;ffffffff810be3af&gt;] ? __find_get_block+0x4b/0x165
[&lt;ffffffff81326c1b&gt;] ? wq_sync_buffer+0x0/0x78
[&lt;ffffffff81326c76&gt;] wq_sync_buffer+0x5b/0x78
[&lt;ffffffff8104aa30&gt;] worker_thread+0x113/0x1ac
[&lt;ffffffff8104dd95&gt;] ? autoremove_wake_function+0x0/0x38
[&lt;ffffffff8104a91d&gt;] ? worker_thread+0x0/0x1ac
[&lt;ffffffff8104dc9a&gt;] kthread+0x88/0x92
[&lt;ffffffff8100bdba&gt;] child_rip+0xa/0x20
[&lt;ffffffff8104dc12&gt;] ? kthread+0x0/0x92
[&lt;ffffffff8100bdb0&gt;] ? child_rip+0x0/0x20
---[ end trace f561c0a58fcc89bd ]---

Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ring-buffer: Fix memleak in ring_buffer_free()</title>
<updated>2009-08-16T21:19:07+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2009-08-07T10:49:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe1bbf0945bfff8913fe36b54bde71ebc412ce4b'/>
<id>fe1bbf0945bfff8913fe36b54bde71ebc412ce4b</id>
<content type='text'>
commit bd3f02212d6a457267e0c9c02c426151c436d9d4 upstream.

I noticed oprofile memleaked in linux-2.6 current tree,
and tracked this ring-buffer leak.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
LKML-Reference: &lt;4A7C06B9.2090302@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bd3f02212d6a457267e0c9c02c426151c436d9d4 upstream.

I noticed oprofile memleaked in linux-2.6 current tree,
and tracked this ring-buffer leak.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
LKML-Reference: &lt;4A7C06B9.2090302@gmail.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ring-buffer: do not remove reader page from list on ring buffer free</title>
<updated>2009-04-01T12:47:53+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-30T18:03:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2e572895bf3203e881356a4039ab0fa428ed2639'/>
<id>2e572895bf3203e881356a4039ab0fa428ed2639</id>
<content type='text'>
Impact: prevent possible memory leak

The reader page of the ring buffer is special. Although it points
into the ring buffer, it is not part of the actual buffer. It is
a page used by the reader to swap with a page in the ring buffer.
Once the swap is made, the new reader page is again outside the
buffer.

Even though the reader page points into the buffer, it is really
pointing to residual data. Note, this data is used by the reader.

              reader page
                  |
                  v
       (prev)   +---+    (next)
     +----------|   |----------+
     |          +---+          |
     v                         v
   +---+        +---+        +---+
--&gt;|   |-------&gt;|   |-------&gt;|   |---&gt;
&lt;--|   |&lt;-------|   |&lt;-------|   |&lt;---
   +---+        +---+        +---+

     ^            ^            ^
      \           |            /
       ------- Buffer---------

If we perform a list_del_init() on the reader page we will actually remove
the last page the reader swapped with and not the reader page itself.
This will cause that page to not be freed, and thus is a memory leak.

Luckily, the only user of the ring buffer so far is ftrace. And ftrace
will not free its ring buffer after it allocates it. There is no current
possible memory leak. But once there are other users, or if ftrace
dynamically creates and frees its ring buffer, then this would be a
memory leak.

This patch fixes the leak for future cases.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: prevent possible memory leak

The reader page of the ring buffer is special. Although it points
into the ring buffer, it is not part of the actual buffer. It is
a page used by the reader to swap with a page in the ring buffer.
Once the swap is made, the new reader page is again outside the
buffer.

Even though the reader page points into the buffer, it is really
pointing to residual data. Note, this data is used by the reader.

              reader page
                  |
                  v
       (prev)   +---+    (next)
     +----------|   |----------+
     |          +---+          |
     v                         v
   +---+        +---+        +---+
--&gt;|   |-------&gt;|   |-------&gt;|   |---&gt;
&lt;--|   |&lt;-------|   |&lt;-------|   |&lt;---
   +---+        +---+        +---+

     ^            ^            ^
      \           |            /
       ------- Buffer---------

If we perform a list_del_init() on the reader page we will actually remove
the last page the reader swapped with and not the reader page itself.
This will cause that page to not be freed, and thus is a memory leak.

Luckily, the only user of the ring buffer so far is ftrace. And ftrace
will not free its ring buffer after it allocates it. There is no current
possible memory leak. But once there are other users, or if ftrace
dynamically creates and frees its ring buffer, then this would be a
memory leak.

This patch fixes the leak for future cases.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'tracing/docs', 'tracing/filters', 'tracing/ftrace', 'tracing/kprobes', 'tracing/blktrace-v2' and 'tracing/textedit' into tracing/core-v2</title>
<updated>2009-03-31T15:46:40+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2009-03-31T15:46:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b54e45b0005875f59cb8b1c44d429a161d5f245'/>
<id>8b54e45b0005875f59cb8b1c44d429a161d5f245</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing: add ring_buffer_event_discard() to ring buffer</title>
<updated>2009-03-22T17:38:25+00:00</updated>
<author>
<name>Tom Zanussi</name>
<email>tzanussi@gmail.com</email>
</author>
<published>2009-03-22T08:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d622719f1572ef31e0616444a515eba3094d050'/>
<id>2d622719f1572ef31e0616444a515eba3094d050</id>
<content type='text'>
This patch overloads RINGBUF_TYPE_PADDING to provide a way to discard
events from the ring buffer, for the event-filtering mechanism
introduced in a subsequent patch.

I did the initial version but thanks to Steven Rostedt for adding
the parts that actually made it work. ;-)

Signed-off-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch overloads RINGBUF_TYPE_PADDING to provide a way to discard
events from the ring buffer, for the event-filtering mechanism
introduced in a subsequent patch.

I did the initial version but thanks to Steven Rostedt for adding
the parts that actually made it work. ;-)

Signed-off-by: Tom Zanussi &lt;tzanussi@gmail.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing/ring-buffer: don't annotate rb_cpu_notify with __cpuinit</title>
<updated>2009-03-21T09:54:10+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-21T03:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=09c9e84d474d917d9de5b9011ed2064b03a19677'/>
<id>09c9e84d474d917d9de5b9011ed2064b03a19677</id>
<content type='text'>
Impact: remove a section warning

CONFIG_DEBUG_SECTION_MISMATCH raises the following warning on -tip:

  WARNING: kernel/trace/built-in.o(.text+0x5bc5): Section mismatch in
  reference from the function ring_buffer_alloc() to the function
  .cpuinit.text:rb_cpu_notify()
  The function ring_buffer_alloc() references
  the function __cpuinit rb_cpu_notify().

This is actually harmless. The code in the ring buffer don't build
rb_cpu_notify and other cpu hotplug stuffs when !CONFIG_HOTPLUG_CPU
so we have no risk to reference freed memory here (it would even
be harmless if we unconditionally build it because register_cpu_notifier
would do nothing when !CONFIG_HOTPLUG_CPU.

But since ring_buffer_alloc() can be called everytime, we don't want it
to be annotated with __cpuinit so we drop the __cpuinit from
rb_cpu_notify.

This is not a waste of memory because it is only defined and used on
CONFIG_HOTPLUG_CPU.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1237606416-22268-1-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: remove a section warning

CONFIG_DEBUG_SECTION_MISMATCH raises the following warning on -tip:

  WARNING: kernel/trace/built-in.o(.text+0x5bc5): Section mismatch in
  reference from the function ring_buffer_alloc() to the function
  .cpuinit.text:rb_cpu_notify()
  The function ring_buffer_alloc() references
  the function __cpuinit rb_cpu_notify().

This is actually harmless. The code in the ring buffer don't build
rb_cpu_notify and other cpu hotplug stuffs when !CONFIG_HOTPLUG_CPU
so we have no risk to reference freed memory here (it would even
be harmless if we unconditionally build it because register_cpu_notifier
would do nothing when !CONFIG_HOTPLUG_CPU.

But since ring_buffer_alloc() can be called everytime, we don't want it
to be annotated with __cpuinit so we drop the __cpuinit from
rb_cpu_notify.

This is not a waste of memory because it is only defined and used on
CONFIG_HOTPLUG_CPU.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1237606416-22268-1-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tracing/ring-buffer: fix non cpu hotplug case</title>
<updated>2009-03-19T15:41:08+00:00</updated>
<author>
<name>Frederic Weisbecker</name>
<email>fweisbec@gmail.com</email>
</author>
<published>2009-03-19T13:47:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3bf832ce1fe6988148d392599f34ca0c6a34427d'/>
<id>3bf832ce1fe6988148d392599f34ca0c6a34427d</id>
<content type='text'>
Impact: fix warning with irqsoff tracer

The ring buffer allocates its buffers on pre-smp time (early_initcall).
It means that, at first, only the boot cpu buffer is allocated and
the ring-buffer cpumask only has the boot cpu set (cpu_online_mask).

Later, the secondary cpu will show up and the ring-buffer will be notified
about this event: the appropriate buffer will be allocated and the cpumask
will be updated.

Unfortunately, if !CONFIG_CPU_HOTPLUG, the ring-buffer will not be
notified about the secondary cpus, meaning that the cpumask will have
only the cpu boot set, and only one cpu buffer allocated.

We fix that by using cpu_possible_mask if !CONFIG_CPU_HOTPLUG.

This patch fixes the following warning with irqsoff tracer running:

[  169.317794] WARNING: at kernel/trace/trace.c:466 update_max_tr_single+0xcc/0xf3()
[  169.318002] Hardware name: AMILO Li 2727
[  169.318002] Modules linked in:
[  169.318002] Pid: 5624, comm: bash Not tainted 2.6.29-rc8-tip-02636-g6aafa6c #11
[  169.318002] Call Trace:
[  169.318002]  [&lt;ffffffff81036182&gt;] warn_slowpath+0xea/0x13d
[  169.318002]  [&lt;ffffffff8100b9d6&gt;] ? ftrace_call+0x5/0x2b
[  169.318002]  [&lt;ffffffff8100b9d6&gt;] ? ftrace_call+0x5/0x2b
[  169.318002]  [&lt;ffffffff8100b9d1&gt;] ? ftrace_call+0x0/0x2b
[  169.318002]  [&lt;ffffffff8101ef10&gt;] ? ftrace_modify_code+0xa9/0x108
[  169.318002]  [&lt;ffffffff8106e27f&gt;] ? trace_hardirqs_off+0x25/0x27
[  169.318002]  [&lt;ffffffff8149afe7&gt;] ? _spin_unlock_irqrestore+0x1f/0x2d
[  169.318002]  [&lt;ffffffff81064f52&gt;] ? ring_buffer_reset_cpu+0xf6/0xfb
[  169.318002]  [&lt;ffffffff8106637c&gt;] ? ring_buffer_reset+0x36/0x48
[  169.318002]  [&lt;ffffffff8106aeda&gt;] update_max_tr_single+0xcc/0xf3
[  169.318002]  [&lt;ffffffff8100bc17&gt;] ? sysret_check+0x22/0x5d
[  169.318002]  [&lt;ffffffff8106e3ea&gt;] stop_critical_timing+0x142/0x204
[  169.318002]  [&lt;ffffffff8106e4cf&gt;] trace_hardirqs_on_caller+0x23/0x25
[  169.318002]  [&lt;ffffffff8149ac28&gt;] trace_hardirqs_on_thunk+0x3a/0x3c
[  169.318002]  [&lt;ffffffff8100bc17&gt;] ? sysret_check+0x22/0x5d
[  169.318002] ---[ end trace db76cbf775a750cf ]---

Because this tracer may try to swap two cpu ring buffers for an
unregistered cpu on the ring buffer.

This patch might also fix a fair loss of traces due to unallocated buffers
for secondary cpus.

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Acked-b: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1237470453-5427-1-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: fix warning with irqsoff tracer

The ring buffer allocates its buffers on pre-smp time (early_initcall).
It means that, at first, only the boot cpu buffer is allocated and
the ring-buffer cpumask only has the boot cpu set (cpu_online_mask).

Later, the secondary cpu will show up and the ring-buffer will be notified
about this event: the appropriate buffer will be allocated and the cpumask
will be updated.

Unfortunately, if !CONFIG_CPU_HOTPLUG, the ring-buffer will not be
notified about the secondary cpus, meaning that the cpumask will have
only the cpu boot set, and only one cpu buffer allocated.

We fix that by using cpu_possible_mask if !CONFIG_CPU_HOTPLUG.

This patch fixes the following warning with irqsoff tracer running:

[  169.317794] WARNING: at kernel/trace/trace.c:466 update_max_tr_single+0xcc/0xf3()
[  169.318002] Hardware name: AMILO Li 2727
[  169.318002] Modules linked in:
[  169.318002] Pid: 5624, comm: bash Not tainted 2.6.29-rc8-tip-02636-g6aafa6c #11
[  169.318002] Call Trace:
[  169.318002]  [&lt;ffffffff81036182&gt;] warn_slowpath+0xea/0x13d
[  169.318002]  [&lt;ffffffff8100b9d6&gt;] ? ftrace_call+0x5/0x2b
[  169.318002]  [&lt;ffffffff8100b9d6&gt;] ? ftrace_call+0x5/0x2b
[  169.318002]  [&lt;ffffffff8100b9d1&gt;] ? ftrace_call+0x0/0x2b
[  169.318002]  [&lt;ffffffff8101ef10&gt;] ? ftrace_modify_code+0xa9/0x108
[  169.318002]  [&lt;ffffffff8106e27f&gt;] ? trace_hardirqs_off+0x25/0x27
[  169.318002]  [&lt;ffffffff8149afe7&gt;] ? _spin_unlock_irqrestore+0x1f/0x2d
[  169.318002]  [&lt;ffffffff81064f52&gt;] ? ring_buffer_reset_cpu+0xf6/0xfb
[  169.318002]  [&lt;ffffffff8106637c&gt;] ? ring_buffer_reset+0x36/0x48
[  169.318002]  [&lt;ffffffff8106aeda&gt;] update_max_tr_single+0xcc/0xf3
[  169.318002]  [&lt;ffffffff8100bc17&gt;] ? sysret_check+0x22/0x5d
[  169.318002]  [&lt;ffffffff8106e3ea&gt;] stop_critical_timing+0x142/0x204
[  169.318002]  [&lt;ffffffff8106e4cf&gt;] trace_hardirqs_on_caller+0x23/0x25
[  169.318002]  [&lt;ffffffff8149ac28&gt;] trace_hardirqs_on_thunk+0x3a/0x3c
[  169.318002]  [&lt;ffffffff8100bc17&gt;] ? sysret_check+0x22/0x5d
[  169.318002] ---[ end trace db76cbf775a750cf ]---

Because this tracer may try to swap two cpu ring buffers for an
unregistered cpu on the ring buffer.

This patch might also fix a fair loss of traces due to unallocated buffers
for secondary cpus.

Reported-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Acked-b: Steven Rostedt &lt;rostedt@goodmis.org&gt;
LKML-Reference: &lt;1237470453-5427-1-git-send-email-fweisbec@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ring-buffer: add api to allow a tracer to change clock source</title>
<updated>2009-03-18T03:06:31+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-17T21:22:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37886f6a9f62d22530ffee8d3f9215c8345b6969'/>
<id>37886f6a9f62d22530ffee8d3f9215c8345b6969</id>
<content type='text'>
This patch adds a new function called ring_buffer_set_clock that
allows a tracer to assign its own clock source to the buffer.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a new function called ring_buffer_set_clock that
allows a tracer to assign its own clock source to the buffer.

Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ring-buffer: document reader page design</title>
<updated>2009-03-13T02:24:17+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-13T02:24:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5cc985488845ec7227a2c5cfd2fd62cf57fb411a'/>
<id>5cc985488845ec7227a2c5cfd2fd62cf57fb411a</id>
<content type='text'>
In a private email conversation I explained how the ring buffer
page worked by using silly ASCII art. Ingo suggested that I add
that to the comments of the code.

Here it is.

Requested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a private email conversation I explained how the ring buffer
page worked by using silly ASCII art. Ingo suggested that I add
that to the comments of the code.

Here it is.

Requested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ring-buffer: remove unneeded get_online_cpus</title>
<updated>2009-03-13T01:14:59+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-03-12T17:13:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8aabee573dff131a085c63de7667eacd94ba4ccb'/>
<id>8aabee573dff131a085c63de7667eacd94ba4ccb</id>
<content type='text'>
Impact: speed up and remove possible races

The get_online_cpus was added to the ring buffer because the original
design would free the ring buffer on a CPU that was being taken
off line. The final design kept the ring buffer around even when the
CPU was taken off line. This is to allow a user to still read the
information on that ring buffer.

Most of the get_online_cpus are no longer needed since the ring buffer will
not disappear from the use cases.

Reported-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: speed up and remove possible races

The get_online_cpus was added to the ring buffer because the original
design would free the ring buffer on a CPU that was being taken
off line. The final design kept the ring buffer around even when the
CPU was taken off line. This is to allow a user to still read the
information on that ring buffer.

Most of the get_online_cpus are no longer needed since the ring buffer will
not disappear from the use cases.

Reported-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
