Skip to content

Commit 06db0b2

Browse files
Peter Zijlstraingomolnar
authored andcommitted
perf: Remove fragile swevent hlist optimization
Currently we only allocate a single cpu hashtable for per-cpu swevents; do away with this optimization for it is fragile in the face of things like perf_pmu_migrate_context(). The easiest thing is to make sure all CPUs are consistent wrt state. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20130913111447.GN31370@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent d5b5f39 commit 06db0b2

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

‎kernel/events/core.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5680,11 +5680,6 @@ static void swevent_hlist_put(struct perf_event *event)
56805680
{
56815681
int cpu;
56825682

5683-
if (event->cpu != -1) {
5684-
swevent_hlist_put_cpu(event, event->cpu);
5685-
return;
5686-
}
5687-
56885683
for_each_possible_cpu(cpu)
56895684
swevent_hlist_put_cpu(event, cpu);
56905685
}
@@ -5718,9 +5713,6 @@ static int swevent_hlist_get(struct perf_event *event)
57185713
int err;
57195714
int cpu, failed_cpu;
57205715

5721-
if (event->cpu != -1)
5722-
return swevent_hlist_get_cpu(event, event->cpu);
5723-
57245716
get_online_cpus();
57255717
for_each_possible_cpu(cpu) {
57265718
err = swevent_hlist_get_cpu(event, cpu);

0 commit comments

Comments
 (0)