Lines Matching refs:reader

25 consumer - the task that reads from the buffer (same as reader)
27 reader - same as consumer.
30 by the reader.
32 head_page - a pointer to the page that the reader will use next
81 same time, nor can a reader preempt/interrupt another reader. A reader
83 buffer at the same time as a writer is writing, but the reader must be
84 on another processor to do so. A reader may read on its own processor
87 A writer can preempt a reader, but a reader cannot preempt a writer.
88 But a reader can read the buffer at the same time (on another processor)
93 At initialization a reader page is allocated for the reader that is not
99 The reader page is initialized to have its next pointer pointing to
103 The reader has its own page to use. At start up time, this page is
104 allocated but is not attached to the list. When the reader wants
106 it will swap its page with the head_page. The old reader page will
111 Once the new page is given to the reader, the reader could do what
114 A sample of how the reader page is swapped: Note this does not
119 |reader| RING BUFFER
132 |reader| RING BUFFER
145 |reader| RING BUFFER
176 reader page commit page tail page
193 since the reader page still points to the next location in the ring
199 reader page - The page used solely by the reader and is not part
203 with the reader page.
313 swapped with the reader page. This is because the head page is always
314 part of the ring buffer, but the reader page is not. Whenever there
316 and a reader swaps out a page, it will be swapping out the commit page.
319 reader page commit page tail page
341 The reader cannot swap a page into the ring buffer if the commit page
387 Note, the reader page will still point to the previous head page.
395 of the head_page pointer with the swapping of pages with the reader.
414 reader page
429 the next page is the next page to be swapped out by the reader.
454 Any access to the reader will need to take some sort of lock to serialize
456 ring buffer. This means we only need to worry about a single reader,
459 When the reader tries to swap the page with the ring buffer, it
462 and the reader will need to look for the new head page and try again.
465 The reader swaps the reader page as follows:
468 |reader| RING BUFFER
479 The reader sets the reader page next pointer as HEADER to the page after
484 |reader| RING BUFFER
497 point to the reader page. Note that the new pointer does not have the HEADER
501 |reader| RING BUFFER
514 updated to the reader page.
517 |reader| RING BUFFER
542 Another important point: The page that the reader page points back to
544 never points back to the reader page. That is because the reader page is
549 Note, the way to determine a reader page is simply by examining the previous
551 point back to the original page, then the original page is a reader page:
555 | reader | next +----+
570 flag to have the UPDATE flag set. Once this is done, the reader will
574 This eliminates any races that the reader can have on the writer. The reader
575 must spin, and this is why the reader cannot preempt the writer.
632 reader page? The commit page is not part of the ring buffer. The tail page
636 reader page commit page
655 leaving the reader page would not be pointing to the correct page.
657 The solution to this is to test if the commit page is on the reader page
664 tail page. The reader cannot swap the reader page if it is also being
665 used as the commit page. The reader can simply check that the commit
666 is off the reader page. Once the commit page leaves the reader page
667 it will never go back on it unless a reader does another swap with the
943 the reader from seeing the incorrect head page.