lkml.org 
[lkml]   [2009]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/3] ring-buffer: add design document

    On Thu, 11 Jun 2009, Hidetoshi Seto wrote:
    > Steven Rostedt wrote:
    > > +
    > > + +------+
    > > + |reader| RING BUFFER
    > > + |page |-------------------+
    > > + +------+ <---------------+ v
    > > + | ^ +---+ +---+ +---+
    > > + | | | |-->| |-->| |
    > > + | | | |<--| |<--| |<-+
    > > + | | +---+ +---+ +---+ |
    > > + | | | ^ | |
    > > + | | +-------------+ | |
    > > + | +-----------------------------+ |
    > > + +------------------------------------+
    >
    > It seems the middle of three pages have 2 prev arrows... ?

    Yes that is a mistake. Thanks, I'll fix it.
    > > +
    > > +It does a cmpxchg with the pointer to the previous head page to make it
    > > +point to the reader page. Note that the new pointer does not have the HEADER
    > > +flag set. This action atomically moves the head page forward.
    > > +
    > > + +------+
    > > + |reader| RING BUFFER
    > > + |page |-------H-----------+
    > > + +------+ <---------------+ v
    > > + | ^ +---+ +---+ +---+
    > > + | | | |-->| |-->| |
    > > + | | | |<--| |<--| |<-+
    > > + | | +---+ +---+ +---+ |
    > > + | | | ^ | |
    > > + | | +-------------+ | |
    > > + | +-----------------------------+ |
    > > + +------------------------------------+
    > > +
    >
    > Ditto.

    Ditto too ;-)

    Thanks,

    -- Steve



    \
     
     \ /
      Last update: 2009-06-11 05:29    [from the cache]
    ©2003-2011 Jasper Spaans