Skip to content
  • Steven Rostedt (Red Hat)'s avatar
    ring-buffer: Fix first commit on sub-buffer having non-zero delta · d651aa1d
    Steven Rostedt (Red Hat) authored
    Each sub-buffer (buffer page) has a full 64 bit timestamp. The events on
    that page use a 27 bit delta against that timestamp in order to save on
    bits written to the ring buffer. If the time between events is larger than
    what the 27 bits can hold, a "time extend" event is added to hold the
    entire 64 bit timestamp again and the events after that hold a delta from
    that timestamp.
    
    As a "time extend" is always paired with an event, it is logical to just
    allocate the event with the time extend, to make things a bit more efficient.
    
    Unfortunately, when the pairing code was written, it removed the "delta = 0"
    from the first commit on a page, causing the events on the page to be
    slightly skewed.
    
    Fixes: 69d1b839
    
     "ring-buffer: Bind time extend and data events together"
    Cc: stable@vger.kernel.org # 2.6.37+
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    d651aa1d