[lkml]   [2005]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 1/6] statistics infrastructure - prerequisite: scatter-gather ringbuffer
    Andi Kleen wrote:

    >Martin Peschke <> writes:
    >>[patch 1/6] statistics infrastructure - prerequisite: scatter-gather ringbuffer
    >>This patch implemenents a ringbuffer made up of scattered memory (pages).
    >>The current implementation allows fixed-size entries to be stored in the
    >>ringbuffer. There are routines that simplify writing entries to a buffer
    >>and reading entries from a buffer. Ringbuffer resizing is not supported, yet.
    >>This is actually a separate feature which could be used for purposes
    >>other than statistics.
    >This seems redundant with relayfs.
    Interesting pointer.

    Just having scanned through the relayfs documentation the first time, to
    me, relayfs looks like a combination of ringbuffer functionality,
    kernel-user space communication, and easy-to-use filesystem semantics.

    Not sure I really need that much for my purposes. I was primarily
    looking for a simple way to temporarily store small bits of data in a
    larger buffer that wraps and isn't overly risky with regard to it's
    allocation. Both producer and consumer of the stored data are inside the
    kernel, or even within the same component.

    Relayfs might be interesting for statistics, nonetheless, considering
    that there need to be a way to transfer data to user space.

    Relayfs seems to be the right thing to convey streams of incremental
    pieces of data, like trace records as implemented by
    arch/s390/kernel/debug.c, for example. Relayfs would work for statistics
    that involve data growth like a history of a counter, for example, or
    the raw measurement data reported for statistic updates. I doubt it is
    the right thing for counters, fill level indicators and histograms;
    basically for all types of statistics that do not continuously put their
    hands on untouched memory to store their results.

    I am currently using debugfs, which works fine for all of these cases.
    In addition, I need some ringbuffer functionality, though.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-12-15 03:38    [W:0.028 / U:3.196 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site