When crossing over to a new page, commit the current work. This will allow
readers to get data with less latency, and also simplifies the work to get
timestamps working for interrupted events.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
        local_sub(length, &tail_page->write);
 }
 
+static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer);
+
 /*
  * This is the slow path, force gcc not to inline it.
  */
 
        rb_reset_tail(cpu_buffer, tail, info);
 
+       /* Commit what we have for now. */
+       rb_end_commit(cpu_buffer);
+       /* rb_end_commit() decs committing */
+       local_inc(&cpu_buffer->committing);
+
        /* fail and let the caller try again */
        return ERR_PTR(-EAGAIN);