lkml.org 
[lkml]   [2010]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 5/6] perf: Fix perf_event_exit_cpu_context()
    Use the right cpu-context.. spotted by preempt warning on hot-unplug

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    kernel/perf_event.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    Index: linux-2.6/kernel/perf_event.c
    ===================================================================
    --- linux-2.6.orig/kernel/perf_event.c
    +++ linux-2.6/kernel/perf_event.c
    @@ -6259,14 +6259,13 @@ static void perf_event_exit_cpu_context(

    idx = srcu_read_lock(&pmus_srcu);
    list_for_each_entry_rcu(pmu, &pmus, entry) {
    - ctx = &this_cpu_ptr(pmu->pmu_cpu_context)->ctx;
    + ctx = &per_cpu_ptr(pmu->pmu_cpu_context, cpu)->ctx;

    mutex_lock(&ctx->mutex);
    smp_call_function_single(cpu, __perf_event_exit_context, ctx, 1);
    mutex_unlock(&ctx->mutex);
    }
    srcu_read_unlock(&pmus_srcu, idx);
    -
    }

    static void perf_event_exit_cpu(int cpu)



    \
     
     \ /
      Last update: 2010-09-17 11:37    [W:0.021 / U:0.028 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site