Repository navigation
Commit ff84c50
committed
ring-buffer: Do not die if rb_iter_peek() fails more than thrice
As the iterator will be reading a live buffer, and if the event being read
is on a page that a writer crosses, it will fail and try again, the
condition in rb_iter_peek() that only allows a retry to happen three times
is no longer valid. Allow rb_iter_peek() to retry more than three times
without killing the ring buffer, but only if rb_iter_head_event() had failed
at least once.
Link: http://lkml.kernel.org/r/20200317213416.452888193@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>1 parent 785888c commit ff84c50
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4012 | 4012 | | |
4013 | 4013 | | |
4014 | 4014 | | |
| 4015 | + | |
4015 | 4016 | | |
4016 | 4017 | | |
4017 | 4018 | | |
| |||
4038 | 4039 | | |
4039 | 4040 | | |
4040 | 4041 | | |
4041 | | - | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
4042 | 4045 | | |
4043 | | - | |
| 4046 | + | |
| 4047 | + | |
4044 | 4048 | | |
| 4049 | + | |
4045 | 4050 | | |
4046 | 4051 | | |
4047 | 4052 | | |
| |||
4052 | 4057 | | |
4053 | 4058 | | |
4054 | 4059 | | |
4055 | | - | |
| 4060 | + | |
| 4061 | + | |
4056 | 4062 | | |
| 4063 | + | |
4057 | 4064 | | |
4058 | 4065 | | |
4059 | 4066 | | |
| |||
0 commit comments