lkml.org 
[lkml]   [2011]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/5] Add dynamic updates to trace ring buffer
Date
These patches are in response to the fact that sometimes there are
higher rate of events generated on some CPUs as compared to others. This
makes it inefficient to have equal memory size allocated to each of the
per-cpu ring buffers.

This patch series adds 3 things to achieve this:
* Add a way to measure the rate of events generated on a CPU. This is a
part of patch#2 which makes the 'stats' files print out the number of
bytes in the ring buffer, the oldest time stamp ("head ts"), and the
current time stamp ("now ts"). The rate is measured as: bytes /
(now-head)

* The next patch#3 adds the flexibility to assign different sizes to
individual per-cpu ring buffers. This is done by adding a
"buffer_size_kb" debugfs file entry under per_cpu/* directories.
* The final two patches provide a way to change the size of ring
buffer concurrent to events being added to the ring buffer. Patch#4
adds functionality to remove pages from the ring buffer and patch#5
adds functionality to add pages to the ring buffer.

Patch#1 adds a debugfs entry "buffer_total_size_kb" which provides the
total memory allocated for the ring buffer.

This makes it easy for a user process to monitor the rate at which the
ring buffers are being filled up and update the individual per-cpu ring
buffer sizes in response to it.

Vaibhav Nagarnaik (5):
trace: Add a new readonly entry to report total buffer size
trace: Add ring buffer stats to measure rate of events
trace: Add per_cpu ring buffer control files
trace: Make removal of ring buffer pages atomic
trace: Make addition of pages in ring buffer atomic

include/linux/ring_buffer.h | 8 +-
kernel/trace/ring_buffer.c | 562 +++++++++++++++++++++++++++++++------------
kernel/trace/trace.c | 241 ++++++++++++++----
kernel/trace/trace.h | 2 +-
4 files changed, 603 insertions(+), 210 deletions(-)
--
1.7.3.1



\
 
 \ /
  Last update: 2011-07-27 01:03    [from the cache]
©2003-2011 Jasper Spaans