Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147481
b: refs/heads/master
c: 34adc80
h: refs/heads/master
i:
  147479: d73bd83
v: v3
  • Loading branch information
Ingo Molnar committed May 20, 2009
1 parent 3b1337a commit 29bd190
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afedadf23a2c90f3ba0d963282cbe6a6be129494
refs/heads/master: 34adc8062227f41b04ade0ff3fbd1dbe3002669e
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ static int intel_pmu_handle_irq(struct pt_regs *regs, int nmi)
again:
if (++loops > 100) {
WARN_ONCE(1, "perfcounters: irq loop stuck!\n");
perf_counter_print_debug();
return 1;
}

Expand Down
12 changes: 6 additions & 6 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,17 @@ static void __perf_counter_remove_from_context(void *info)
return;

spin_lock_irqsave(&ctx->lock, flags);
/*
* Protect the list operation against NMI by disabling the
* counters on a global level.
*/
perf_disable();

counter_sched_out(counter, cpuctx, ctx);

counter->task = NULL;

/*
* Protect the list operation against NMI by disabling the
* counters on a global level. NOP for non NMI based counters.
*/
perf_disable();
list_del_counter(counter, ctx);
perf_enable();

if (!ctx->task) {
/*
Expand All @@ -231,6 +230,7 @@ static void __perf_counter_remove_from_context(void *info)
perf_max_counters - perf_reserved_percpu);
}

perf_enable();
spin_unlock_irqrestore(&ctx->lock, flags);
}

Expand Down

0 comments on commit 29bd190

Please sign in to comment.