[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: I.5 - Mmaped count

    On Tue, Jun 23, 2009 at 2:39 AM, Paul Mackerras<> wrote:
    > Hmmm, when the counter is running, what you want is not so much the
    > total time so far as a way to compute the total time so far from the
    > current TSC/timebase value.  So we would need to export tstamp_enabled
    > and tstamp_running plus a scale/offset for converting the TSC/timebase
    > value to nanoseconds consistent with ctx->time.  On powerpc that's
    > pretty straightforward because the timebases, but on x86 I gather the
    > offset and maybe also the scale would need to be per-cpu (which is OK,
    > because all the values in the mmapped page are only useful on one
    > specific CPU).
    I think you should make it such that reading via mmap and read() are
    equivalent, one is just lower overhead than the other. Otherwise it would
    make it more difficult for tools in case of multiplexing where you could
    fallback to read() and there you would not get the same information.

    > How would we compute the scale and offset on x86, given the current
    > TSC value and ctx->time?
    > Paul.
    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: 2009-06-23 09:43    [W:0.020 / U:12.824 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site