[lkml]   [2011]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[PATCH v2 0/5] Add dynamic updates to trace ring buffer
    These patches are in response to the fact that sometimes there is 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 /

    * 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.

    Changelog v2-v1:
    * This changes the logic of page removal from the ring buffer, based on
    comments from Steven Rostedt about the racey behavior of earlier code.
    * Some other changes to the functionality and variable names as asked by
    Steven Rostedt.

    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 | 543 ++++++++++++++++++++++++++++++-------------
    kernel/trace/trace.c | 247 +++++++++++++++-----
    kernel/trace/trace.h | 2 +-
    4 files changed, 583 insertions(+), 217 deletions(-)


     \ /
      Last update: 2011-08-16 23:49    [W:0.022 / U:229.904 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site