<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/trace/ring_buffer.c, branch v4.5</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=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-11-25T20:24:05Z</updated>
<entry>
<title>ring-buffer: Process commits whenever moving to a new page.</title>
<updated>2015-11-25T20:24:05Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-11-17T21:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4239c38fe0b3847e1e6d962c74b41b08ba0e2990'/>
<id>urn:sha1:4239c38fe0b3847e1e6d962c74b41b08ba0e2990</id>
<content type='text'>
When crossing over to a new page, commit the current work. This will allow
readers to get data with less latency, and also simplifies the work to get
timestamps working for interrupted events.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Remove redundant update of page timestamp</title>
<updated>2015-11-24T14:29:16Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-11-17T20:15:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70004986ffdf36d8bc787403af2571aeeef96595'/>
<id>urn:sha1:70004986ffdf36d8bc787403af2571aeeef96595</id>
<content type='text'>
The first commit of a buffer page updates the timestamp of that page. No
need to have the update to the next page add the timestamp too. It will only
be replaced by the first commit on that page anyway.

Only update to a page if it contains an event.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Use READ_ONCE() for most tail_page access</title>
<updated>2015-11-24T14:29:15Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-11-17T19:03:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8573636ea794fa088f459429e65e47d7776532cf'/>
<id>urn:sha1:8573636ea794fa088f459429e65e47d7776532cf</id>
<content type='text'>
As cpu_buffer-&gt;tail_page may be modified by interrupts at almost any time,
the flow of logic is very important. Do not let gcc get smart with
re-reading cpu_buffer-&gt;tail_page by adding READ_ONCE() around most of its
accesses.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Put back the length if crossed page with add_timestamp</title>
<updated>2015-11-24T14:27:25Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-11-23T22:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd1b7cd360f529394936f28746eb4aaa12d6770a'/>
<id>urn:sha1:bd1b7cd360f529394936f28746eb4aaa12d6770a</id>
<content type='text'>
Commit fcc742eaad7c "ring-buffer: Add event descriptor to simplify passing
data" added a descriptor that holds various data instead of passing around
several variables through parameters. The problem was that one of the
parameters was modified in a function and the code was designed not to have
an effect on that modified  parameter. Now that the parameter is a
descriptor and any modifications to it are non-volatile, the size of the
data could be unnecessarily expanded.

Remove the extra space added if a timestamp was added and the event went
across the page.

Cc: stable@vger.kernel.org # 4.3+
Fixes: fcc742eaad7c "ring-buffer: Add event descriptor to simplify passing data"
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Update read stamp with first real commit on page</title>
<updated>2015-11-24T14:23:17Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-11-23T15:35:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b81f472a208d3e2b4392faa6d17037a89442f4ce'/>
<id>urn:sha1:b81f472a208d3e2b4392faa6d17037a89442f4ce</id>
<content type='text'>
Do not update the read stamp after swapping out the reader page from the
write buffer. If the reader page is swapped out of the buffer before an
event is written to it, then the read_stamp may get an out of date
timestamp, as the page timestamp is updated on the first commit to that
page.

rb_get_reader_page() only returns a page if it has an event on it, otherwise
it will return NULL. At that point, check if the page being returned has
events and has not been read yet. Then at that point update the read_stamp
to match the time stamp of the reader page.

Cc: stable@vger.kernel.org # 2.6.30+
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: rb_event_is_commit() can return boolean</title>
<updated>2015-11-02T19:25:29Z</updated>
<author>
<name>Yaowei Bai</name>
<email>bywxiaobai@163.com</email>
</author>
<published>2015-09-29T14:43:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdb2a0a91566d413a6e4e2c57c5d341a2e1173f3'/>
<id>urn:sha1:cdb2a0a91566d413a6e4e2c57c5d341a2e1173f3</id>
<content type='text'>
Make rb_event_is_commit() return bool to improve readability
due to this particular function only using either one or zero as its
return value.

No functional change.

Link: http://lkml.kernel.org/r/1443537816-5788-7-git-send-email-bywxiaobai@163.com

Signed-off-by: Yaowei Bai &lt;bywxiaobai@163.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: rb_per_cpu_empty() can return boolean</title>
<updated>2015-11-02T19:24:27Z</updated>
<author>
<name>Yaowei Bai</name>
<email>bywxiaobai@163.com</email>
</author>
<published>2015-09-29T14:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da58834cf2fa83fe3885753009fecaa49a85f246'/>
<id>urn:sha1:da58834cf2fa83fe3885753009fecaa49a85f246</id>
<content type='text'>
Makes rb_per_cpu_empty() return bool to improve readability.

No functional change.

Link: http://lkml.kernel.org/r/1443537816-5788-6-git-send-email-bywxiaobai@163.com

Signed-off-by: Yaowei Bai &lt;bywxiaobai@163.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring_buffer: ring_buffer_empty{cpu}() can return boolean</title>
<updated>2015-11-02T19:23:38Z</updated>
<author>
<name>Yaowei Bai</name>
<email>bywxiaobai@163.com</email>
</author>
<published>2015-09-29T14:43:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d4e204d81eec30abffe55d01912e07ce81eef12'/>
<id>urn:sha1:3d4e204d81eec30abffe55d01912e07ce81eef12</id>
<content type='text'>
Make ring_buffer_empty() and ring_buffer_empty_cpu() return bool.

No functional change.

Link: http://lkml.kernel.org/r/1443537816-5788-5-git-send-email-bywxiaobai@163.com

Signed-off-by: Yaowei Bai &lt;bywxiaobai@163.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: rb_is_reader_page() can return boolean</title>
<updated>2015-11-02T19:23:20Z</updated>
<author>
<name>Yaowei Bai</name>
<email>bywxiaobai@163.com</email>
</author>
<published>2015-09-29T14:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06ca320952dc21c537055d2aa36a2c2e96a1b94d'/>
<id>urn:sha1:06ca320952dc21c537055d2aa36a2c2e96a1b94d</id>
<content type='text'>
Make rb_is_reader_page() return bool to improve readability due to this
particular function only using either true or false as its return value.

No functional change.

Link: http://lkml.kernel.org/r/1443537816-5788-4-git-send-email-bywxiaobai@163.com

Signed-off-by: Yaowei Bai &lt;bywxiaobai@163.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ring-buffer: Revert "ring-buffer: Get timestamp after event is allocated"</title>
<updated>2015-09-03T12:57:12Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-09-03T12:57:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b7dc42fd79390c074e2bff3b172b585d5c2d80c2'/>
<id>urn:sha1:b7dc42fd79390c074e2bff3b172b585d5c2d80c2</id>
<content type='text'>
The commit a4543a2fa9ef31 "ring-buffer: Get timestamp after event is
allocated" is needed for some future work. But after adding it, there is a
race somewhere that causes the saved timestamp to have a slight shift, and
get ahead of the actual timestamp and make it look like time goes backwards.

I'm still looking into why this happens, but in the mean time, this is
holding up other work to get in. I'm reverting the change for now (which
makes the problem go away), and will add it back after I know what is wrong
and fix it.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
