]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Update read stamp with first real commit on page
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Mon, 23 Nov 2015 15:35:36 +0000 (10:35 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 24 Nov 2015 14:23:17 +0000 (09:23 -0500)
commitb4ef115223684750bdf077bfe786b25eefc3bd0d
tree475084e920b2cd8f45cccc45dfa7994b742113d1
parentdb40e31ebbf3ef7dc8769277dd7bd9cc45daf866
ring-buffer: Update read stamp with first real commit on page

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 <rostedt@goodmis.org>
kernel/trace/ring_buffer.c