ring-buffer: Mark the !tail (crossing a page) as unlikely

It is the uncommon case where an event crosses a sub buffer boundary (page)
mark that check at the end of reserving an event as unlikely.
Suggested-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent b23d7a5f
...@@ -3260,7 +3260,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, ...@@ -3260,7 +3260,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
* If this is the first commit on the page, then update * If this is the first commit on the page, then update
* its timestamp. * its timestamp.
*/ */
if (!tail) if (unlikely(!tail))
tail_page->page->time_stamp = info->ts; tail_page->page->time_stamp = info->ts;
/* account for these added bytes */ /* account for these added bytes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment