summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-10-01 00:29:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:39:05 +0200
commitd769041f865330034131525ee6a7f72eb4af2a24 (patch)
tree5c0d93063585c9a94d3c8e8105cc7ad27f4fe0e8 /virt/kvm
parent70255b5e3f1bd1a5af5b1e425ec2c4db7c735112 (diff)
ring_buffer: implement new locking
The old "lock always" scheme had issues with lockdep, and was not very efficient anyways. This patch does a new design to be partially lockless on writes. Writes will add new entries to the per cpu pages by simply disabling interrupts. When a write needs to go to another page than it will grab the lock. A new "read page" has been added so that the reader can pull out a page from the ring buffer to read without worrying about the writer writing over it. This allows us to not take the lock for all reads. The lock is now only taken when a read needs to go to a new page. This is far from lockless, and interrupts still need to be disabled, but it is a step towards a more lockless solution, and it also solves a lot of the issues that were noticed by the first conversion of ftrace to the ring buffers. Note: the ring_buffer_{un}lock API has been removed. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions