• Cyrill Gorcunov's avatar
    x86, perf: P4 PMU -- use hash for p4_get_escr_idx() · 72001990
    Cyrill Gorcunov authored
    Linear search over all p4 MSRs should be fine if only
    we would not use it in events scheduling routine which
    is pretty time critical. Lets use hashes. It should speed
    scheduling up significantly.
    
    v2: Steven proposed to use more gentle approach than issue
        BUG on error, so we use WARN_ONCE now
    Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Lin Ming <ming.m.lin@intel.com>
    LKML-Reference: <20100512174242.GA5190@lenovo>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    72001990
perf_event_p4.c 25.8 KB