Commit ea70a96
ring-buffer: Correct stale comments related to non-consuming readers
Adjust the following code documentation:
* Kernel-doc comments for ring_buffer_read_prepare() and
ring_buffer_read_finish() mention that recording to the ring buffer is
disabled when the read is active. Remove mention of this restriction
because it was already lifted in commit 1039221 ("ring-buffer: Do
not disable recording when there is an iterator").
* Function ring_buffer_read_finish() performs a self-check of the
ring-buffer by locking cpu_buffer->reader_lock and then calling
rb_check_pages(). The preceding comment explains that the lock is
needed because rb_check_pages() clears the HEAD flag required by
readers which might be running in parallel. Remove this explanation
because commit 8843e06 ("ring-buffer: Handle race between
rb_move_tail and rb_check_pages") simplified the function so it no
longer resets the mentioned flag. Nonetheless, the lock is still
needed because a reader swapping a page into the ring buffer can make
the underlying doubly-linked list temporarily inconsistent.
This is a non-functional change.
Link: https://lore.kernel.org/linux-trace-kernel/20240517134008.24529-2-petr.pavlu@suse.com
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent fa3889d commit ea70a96
1 file changed
+3
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5046 | 5046 | | |
5047 | 5047 | | |
5048 | 5048 | | |
5049 | | - | |
| 5049 | + | |
5050 | 5050 | | |
5051 | 5051 | | |
5052 | | - | |
5053 | | - | |
5054 | | - | |
5055 | | - | |
5056 | 5052 | | |
5057 | 5053 | | |
5058 | 5054 | | |
| |||
5139 | 5135 | | |
5140 | 5136 | | |
5141 | 5137 | | |
5142 | | - | |
5143 | | - | |
| 5138 | + | |
5144 | 5139 | | |
5145 | 5140 | | |
5146 | 5141 | | |
5147 | 5142 | | |
5148 | 5143 | | |
5149 | 5144 | | |
5150 | 5145 | | |
5151 | | - | |
5152 | | - | |
5153 | | - | |
5154 | | - | |
5155 | | - | |
5156 | | - | |
| 5146 | + | |
5157 | 5147 | | |
5158 | 5148 | | |
5159 | 5149 | | |
| |||
0 commit comments