summaryrefslogtreecommitdiffstats
path: root/include/media/wm8775.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-10-07 18:18:05 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-10-20 15:17:16 -0400
commit69d1b839f7eee347e357b3f6cce7f630cc6ff93d (patch)
tree5aeefde6c8c0234ccea22169817cef07fcf9c692 /include/media/wm8775.h
parentafcc5c6872f0215d515a637041bb51f8691a8ea7 (diff)
downloadlinux-69d1b839f7eee347e357b3f6cce7f630cc6ff93d.tar.gz
linux-69d1b839f7eee347e357b3f6cce7f630cc6ff93d.tar.bz2
linux-69d1b839f7eee347e357b3f6cce7f630cc6ff93d.zip
ring-buffer: Bind time extend and data events together
When the time between two timestamps is greater than 2^27 nanosecs (~134 ms) a time extend event is added that extends the time difference to 59 bits (~18 years). This is due to events only having a 27 bit field to store time. Currently this time extend is a separate event. We add it just before the event data that is being written to the buffer. But before the event data is committed, the event data can also be discarded (as with the case of filters). But because the time extend has already been committed, it will stay in the buffer. If lots of events are being filtered and no event is being written, then every 134ms a time extend can be added to the buffer without any data attached. To keep from filling the entire buffer with time extends, a time extend will never be the first event in a page because the page timestamp can be used. Time extends can only fill the rest of a page with some data at the beginning. This patch binds the time extend with the data. The difference here is that the time extend is not committed before the data is added. Instead, when a time extend is needed, the space reserved on the ring buffer is the time extend + the data event size. The time extend is added to the first part of the reserved block and the data is added to the second. The time extend event is passed back to the reserver, but since the reserver also uses a function to find the data portion of the reserved block, no changes to the ring buffer interface need to be made. When a commit is discarded, we now remove both the time extend and the event. With this approach no more than one time extend can be in the buffer in a row. Data must always follow a time extend. Thanks to Mathieu Desnoyers for suggesting this idea. Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/media/wm8775.h')
0 files changed, 0 insertions, 0 deletions