summaryrefslogtreecommitdiff
path: root/kernel/sched_features.h
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-10-04 02:00:59 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:39:19 +0200
commitbf41a158cacba6ca5fc6407a54e7ad8ce1567e2e (patch)
treee9424b4927f99cfb3acce3cfab2635ae8f8c8ba1 /kernel/sched_features.h
parent6f807acd27734197b11d42829d3cbb9c0937b572 (diff)
ring-buffer: make reentrant
This patch replaces the local_irq_save/restore with preempt_disable/ enable. This allows for interrupts to enter while recording. To write to the ring buffer, you must reserve data, and then commit it. During this time, an interrupt may call a trace function that will also record into the buffer before the commit is made. The interrupt will reserve its entry after the first entry, even though the first entry did not finish yet. The time stamp delta of the interrupt entry will be zero, since in the view of the trace, the interrupt happened during the first field anyway. Locking still takes place when the tail/write moves from one page to the next. The reader always takes the locks. A new page pointer is added, called the commit. The write/tail will always point to the end of all entries. The commit field will point to the last committed entry. Only this commit entry may update the write time stamp. The reader can only go up to the commit. It cannot go past it. If a lot of interrupts come in during a commit that fills up the buffer, and it happens to make it all the way around the buffer back to the commit, then a warning is printed and new events will be dropped. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_features.h')
0 files changed, 0 insertions, 0 deletions