[lkml]   [2010]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject[RFC][PATCH] PERF_COUNT_SW_RUNNABLE_TASKS: measure and act upon parallellism

    Hi all,

    Here's an initial RFC patch for the parallallism
    events for perf_events.

    It works with a low number of tasks, but runs into a
    couple of issues:
    - something goes wrong when a thread exits. Apparently
    the count is decremented twice. I'm still figuring this
    one out, perhaps sync_stat is to blame.
    This causes things to break with more than 3 threads if
    I recall correctly.
    - the count is stored with the parent event only. This means
    the child list lock is not taken too often.
    - adding threshold support to poll() breaks use with mmap.
    poll() returns when count < threshold although no new
    entries might be added to the memory map.
    - min threshold is actually useless so it should be dropped.

    There's definately more wrong with this early patchset
    and I'm doubting whether perf_events is actually fit for
    this purpose.
    Currently, by design, it's not meant to support counters
    that may also decrement. Also, the foreseen use of poll
    to block execution of the thread doesn't seem to work
    together well with the mmap()-use.

    Some hints, pointers and remarks are definately welcome
    at this stage.


     \ /
      Last update: 2010-02-07 12:33    [W:0.018 / U:61.536 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site