<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/ring_buffer.c, branch v3.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-12-12T02:18:58Z</updated>
<entry>
<title>Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2012-12-12T02:18:58Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-12T02:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da830e589a45f0c42eef6f3cbd07275f8893f181'/>
<id>urn:sha1:da830e589a45f0c42eef6f3cbd07275f8893f181</id>
<content type='text'>
Pull perf fixes from Ingo Molnar:
 "These are late-v3.7 pending fixes for tracing."

Fix up trivial conflict in kernel/trace/ring_buffer.c: the NULL pointer
fix clashed with the change of type of the 'ret' variable.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  ring-buffer: Fix race between integrity check and readers
  ring-buffer: Fix NULL pointer if rb_set_head_page() fails
  ftrace: Clear bits properly in reset_iter_read()
</content>
</entry>
<entry>
<title>ring-buffer: Fix race between integrity check and readers</title>
<updated>2012-11-30T16:09:57Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-11-30T03:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9366c1ba13fbc41bdb57702e75ca4382f209c82f'/>
<id>urn:sha1:9366c1ba13fbc41bdb57702e75ca4382f209c82f</id>
<content type='text'>
The function rb_check_pages() was added to make sure the ring buffer's
pages were sane. This check is done when the ring buffer size is modified
as well as when the iterator is released (closing the "trace" file),
as that was considered a non fast path and a good place to do a sanity
check.

The problem is that the check does not have any locks around it.
If one process were to read the trace file, and another were to read
the raw binary file, the check could happen while the reader is reading
the file.

The issues with this is that the check requires to clear the HEAD page
before doing the full check and it restores it afterward. But readers
require the HEAD page to exist before it can read the buffer, otherwise
it gives a nasty warning and disables the buffer.

By adding the reader lock around the check, this keeps the race from
happening.

Cc: stable@vger.kernel.org # 3.6
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Fix NULL pointer if rb_set_head_page() fails</title>
<updated>2012-11-30T16:09:28Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-11-30T03:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54f7be5b831254199522523ccab4c3d954bbf576'/>
<id>urn:sha1:54f7be5b831254199522523ccab4c3d954bbf576</id>
<content type='text'>
The function rb_set_head_page() searches the list of ring buffer
pages for a the page that has the HEAD page flag set. If it does
not find it, it will do a WARN_ON(), disable the ring buffer and
return NULL, as this should never happen.

But if this bug happens to happen, not all callers of this function
can handle a NULL pointer being returned from it. That needs to be
fixed.

Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Change unsigned long type of ring_buffer_oldest_event_ts() to u64</title>
<updated>2012-11-02T14:21:48Z</updated>
<author>
<name>Yoshihiro YUNOMAE</name>
<email>yoshihiro.yunomae.ez@hitachi.com</email>
</author>
<published>2012-10-11T23:27:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50ecf2c3afead23a05227ab004e4212eca08c207'/>
<id>urn:sha1:50ecf2c3afead23a05227ab004e4212eca08c207</id>
<content type='text'>
ring_buffer_oldest_event_ts() should return a value of u64 type, because
ring_buffer_per_cpu-&gt;buffer_page-&gt;buffer_data_page-&gt;time_stamp is u64 type.

Link: http://lkml.kernel.org/r/1349998076-15495-5-git-send-email-dhsharp@google.com

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Vaibhav Nagarnaik &lt;vnagarnaik@google.com&gt;
Signed-off-by: Yoshihiro YUNOMAE &lt;yoshihiro.yunomae.ez@hitachi.com&gt;
Signed-off-by: David Sharp &lt;dhsharp@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Trivial cleanup</title>
<updated>2012-10-31T20:45:33Z</updated>
<author>
<name>David Sharp</name>
<email>dhsharp@google.com</email>
</author>
<published>2012-06-07T23:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01e3e710a9265fb7092efd67243d7b6dd6e2548a'/>
<id>urn:sha1:01e3e710a9265fb7092efd67243d7b6dd6e2548a</id>
<content type='text'>
Remove ftrace_format_syscall() declaration; it is neither defined nor
used. Also update a comment and formatting.

Link: http://lkml.kernel.org/r/1339112785-21806-1-git-send-email-vnagarnaik@google.com

Signed-off-by: David Sharp &lt;dhsharp@google.com&gt;
Signed-off-by: Vaibhav Nagarnaik &lt;vnagarnaik@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Add a 'dropped events' counter</title>
<updated>2012-10-31T20:45:27Z</updated>
<author>
<name>Slava Pestov</name>
<email>slavapestov@google.com</email>
</author>
<published>2011-07-15T21:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=884bfe89a462fcc85c8abd96171519cf2fe70929'/>
<id>urn:sha1:884bfe89a462fcc85c8abd96171519cf2fe70929</id>
<content type='text'>
The existing 'overrun' counter is incremented when the ring
buffer wraps around, with overflow on (the default). We wanted
a way to count requests lost from the buffer filling up with
overflow off, too. I decided to add a new counter instead
of retro-fitting the existing one because it seems like a
different statistic to count conceptually, and also because
of how the code was structured.

Link: http://lkml.kernel.org/r/1310765038-26399-1-git-send-email-slavapestov@google.com

Signed-off-by: Slava Pestov &lt;slavapestov@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Check for uninitialized cpu buffer before resizing</title>
<updated>2012-10-11T16:21:48Z</updated>
<author>
<name>Vaibhav Nagarnaik</name>
<email>vnagarnaik@google.com</email>
</author>
<published>2012-10-10T23:40:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e49f418c9632790bf456634742d34d97120a784'/>
<id>urn:sha1:8e49f418c9632790bf456634742d34d97120a784</id>
<content type='text'>
With a system where, num_present_cpus &lt; num_possible_cpus, even if all
CPUs are online, non-present CPUs don't have per_cpu buffers allocated.
If per_cpu/&lt;cpu&gt;/buffer_size_kb is modified for such a CPU, it can cause
a panic due to NULL dereference in ring_buffer_resize().

To fix this, resize operation is allowed only if the per-cpu buffer has
been initialized.

Link: http://lkml.kernel.org/r/1349912427-6486-1-git-send-email-vnagarnaik@google.com

Cc: stable@vger.kernel.org # 3.5+
Signed-off-by: Vaibhav Nagarnaik &lt;vnagarnaik@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/trivial: Fix some typos in kernel/trace</title>
<updated>2012-08-07T13:43:32Z</updated>
<author>
<name>Wang Tianhong</name>
<email>wangthbj@linux.vnet.ibm.com</email>
</author>
<published>2012-08-02T06:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=87abb3b15c62033409f5bf2ffb5620c94f91cf2c'/>
<id>urn:sha1:87abb3b15c62033409f5bf2ffb5620c94f91cf2c</id>
<content type='text'>
Fix some typos in kernel/trace.

Link: http://lkml.kernel.org/r/1343887320.2228.9.camel@louis-ThinkPad-T410

Signed-off-by: Wang Tianhong &lt;wangthbj@linux.vnet.ibm.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' into perf/core</title>
<updated>2012-07-18T09:17:17Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2012-07-18T09:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2fe194723f6e4990d01d8c208c7b138fd410522'/>
<id>urn:sha1:a2fe194723f6e4990d01d8c208c7b138fd410522</id>
<content type='text'>
Pick up the latest ring-buffer fixes, before applying a new fix.

Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Fix accounting of entries when removing pages</title>
<updated>2012-06-29T20:17:17Z</updated>
<author>
<name>Vaibhav Nagarnaik</name>
<email>vnagarnaik@google.com</email>
</author>
<published>2012-06-29T19:31:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=48fdc72f23ad9a9956e524a47843135d0bbc3317'/>
<id>urn:sha1:48fdc72f23ad9a9956e524a47843135d0bbc3317</id>
<content type='text'>
When removing pages from the ring buffer, its state is not reset. This
means that the counters need to be correctly updated to account for the
pages removed.

Update the overrun counter to reflect the removed events from the pages.

Link: http://lkml.kernel.org/r/1340998301-1715-1-git-send-email-vnagarnaik@google.com

Cc: Justin Teravest &lt;teravest@google.com&gt;
Cc: David Sharp &lt;dhsharp@google.com&gt;
Signed-off-by: Vaibhav Nagarnaik &lt;vnagarnaik@google.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
