]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Reset "real_end" when page is filled
authorSteven Rostedt <srostedt@redhat.com>
Fri, 21 May 2010 15:55:21 +0000 (11:55 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 25 May 2010 15:57:24 +0000 (11:57 -0400)
commitb3b0c0e868c5de03a5108ff39c74c47c05399d10
tree21a212bb598da40cdb936f7b4492d9b05895d4fc
parentde9cb6f9e20e3dc408be9b9fafaa4a7835e5abea
ring-buffer: Reset "real_end" when page is filled

The code to store the "lost events" requires knowing the real end
of the page. Since the 'commit' includes the padding at the end of
a page a "real_end" variable was used to keep track of the end not
including the padding.

If events were lost, the reader can place the count of events in
the padded area if there is enough room.

The bug this patch fixes is that when we fill the page we do not
reset the real_end variable, and if the writer had wrapped a few
times, the real_end would be incorrect.

This patch simply resets the real_end if the page was filled.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c