Skip to content

Commit

Permalink
Revert "perf_counter, x86: speed up the scheduling fast-path"
Browse files Browse the repository at this point in the history
This reverts commit b68f1d2.

It is causing problems (stuck/stuttering profiling) - when mixed
NMI and non-NMI counters are used.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <20090525153931.703093461@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed May 25, 2009
1 parent a78ac32 commit 53b441a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ static int __hw_perf_counter_init(struct perf_counter *counter)
return -EACCES;
hwc->nmi = 1;
}
perf_counters_lapic_init(hwc->nmi);

if (!hwc->irq_period)
hwc->irq_period = x86_pmu.max_period;
Expand Down Expand Up @@ -612,6 +611,8 @@ static int x86_pmu_enable(struct perf_counter *counter)
hwc->counter_base = x86_pmu.perfctr;
}

perf_counters_lapic_init(hwc->nmi);

x86_pmu.disable(hwc, idx);

cpuc->counters[idx] = counter;
Expand Down Expand Up @@ -1037,7 +1038,7 @@ void __init init_hw_perf_counters(void)

pr_info("... counter mask: %016Lx\n", perf_counter_mask);

perf_counters_lapic_init(1);
perf_counters_lapic_init(0);
register_die_notifier(&perf_counter_nmi_notifier);
}

Expand Down

0 comments on commit 53b441a

Please sign in to comment.