Skip to content

Commit

Permalink
perf: Remove fragile swevent hlist optimization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 19, 2013
1 parent d5b5f39 commit 06db0b2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5680,11 +5680,6 @@ static void swevent_hlist_put(struct perf_event *event)
{
int cpu;

if (event->cpu != -1) {
swevent_hlist_put_cpu(event, event->cpu);
return;
}

for_each_possible_cpu(cpu)
swevent_hlist_put_cpu(event, cpu);
}
Expand Down Expand Up @@ -5718,9 +5713,6 @@ static int swevent_hlist_get(struct perf_event *event)
int err;
int cpu, failed_cpu;

if (event->cpu != -1)
return swevent_hlist_get_cpu(event, event->cpu);

get_online_cpus();
for_each_possible_cpu(cpu) {
err = swevent_hlist_get_cpu(event, cpu);
Expand Down

0 comments on commit 06db0b2

Please sign in to comment.