Commit b81f472
committed
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: [email protected] # 2.6.30+
Signed-off-by: Steven Rostedt <[email protected]>1 parent 1ec2183 commit b81f472
1 file changed
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1887 | 1887 | | |
1888 | 1888 | | |
1889 | 1889 | | |
1890 | | - | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
1896 | 1890 | | |
1897 | 1891 | | |
1898 | 1892 | | |
| |||
3626 | 3620 | | |
3627 | 3621 | | |
3628 | 3622 | | |
3629 | | - | |
| 3623 | + | |
3630 | 3624 | | |
3631 | 3625 | | |
3632 | 3626 | | |
| |||
3636 | 3630 | | |
3637 | 3631 | | |
3638 | 3632 | | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
3639 | 3637 | | |
3640 | 3638 | | |
3641 | 3639 | | |
| |||
0 commit comments