diff options
author | Vaibhav Nagarnaik <vnagarnaik@google.com> | 2012-05-03 18:59:50 -0700 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2012-05-16 16:18:57 -0400 |
commit | 83f40318dab00e3298a1f6d0b12ac025e84e478d (patch) | |
tree | efa4aa0d79337ec7e56d667d513ae69f1b2e38f7 /fs | |
parent | 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce (diff) | |
download | op-kernel-dev-83f40318dab00e3298a1f6d0b12ac025e84e478d.zip op-kernel-dev-83f40318dab00e3298a1f6d0b12ac025e84e478d.tar.gz |
ring-buffer: Make removal of ring buffer pages atomic
This patch adds the capability to remove pages from a ring buffer
without destroying any existing data in it.
This is done by removing the pages after the tail page. This makes sure
that first all the empty pages in the ring buffer are removed. If the
head page is one in the list of pages to be removed, then the page after
the removed ones is made the head page. This removes the oldest data
from the ring buffer and keeps the latest data around to be read.
To do this in a non-racey manner, tracing is stopped for a very short
time while the pages to be removed are identified and unlinked from the
ring buffer. The pages are freed after the tracing is restarted to
minimize the time needed to stop tracing.
The context in which the pages from the per-cpu ring buffer are removed
runs on the respective CPU. This minimizes the events not traced to only
NMI trace contexts.
Link: http://lkml.kernel.org/r/1336096792-25373-1-git-send-email-vnagarnaik@google.com
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Laurent Chavey <chavey@google.com>
Cc: Justin Teravest <teravest@google.com>
Cc: David Sharp <dhsharp@google.com>
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions