aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ring_buffer.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-30 15:32:01 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-07-07 18:36:10 -0400
commit3adc54fa82a68be1cd1ac82ad786ee362796e50a (patch)
tree0538fac360f776354ec6b171e6adb0049cfa9f3b /include/linux/ring_buffer.h
parentddc1637af217dbd8bc51f30e6d24e84476a869a6 (diff)
ring-buffer: make the buffer a true circular link list
This patch changes the ring buffer data pages from using a link list head pointer, to making each buffer page point to another buffer page and never back to a "head". This makes the handling of the ring buffer less complex, since the traversing of the ring buffer pages no longer needs to account for the head pointer. This change also is needed to make the ring buffer lockless. [ Changes in version 2: - Added change that Lai Jiangshan mentioned. From: Lai Jiangshan <laijs@cn.fujitsu.com> Date: Thu, 11 Jun 2009 11:25:48 +0800 LKML-Reference: <4A30793C.6090208@cn.fujitsu.com> I'm not sure whether these 4 lines: bpage = list_entry(pages.next, struct buffer_page, list); list_del_init(&bpage->list); cpu_buffer->pages = &bpage->list; list_splice(&pages, cpu_buffer->pages); equal to these 2 lines: cpu_buffer->pages = pages.next; list_del(&pages); If there are equivalent, I think the second one are simpler. It may be not a really necessarily cleanup. What I asked is: if there are equivalent, could you use these two line: cpu_buffer->pages = pages.next; list_del(&pages); ] [ Impact: simplify the ring buffer to help make it lockless ] Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/linux/ring_buffer.h')
0 files changed, 0 insertions, 0 deletions