Skip to content

Commit

Permalink
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/tip

Pull perf fix from Thomas Gleixner:
 "A single fix for the intel cqm perf facility to prevent IPIs from
  interrupt context"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel/cqm: Return cached counter value from IRQ context
  • Loading branch information
Linus Torvalds committed Jul 26, 2015
2 parents 2800348 + 2c534c0 commit 2579d01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/x86/kernel/cpu/perf_event_intel_cqm.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,14 @@ static u64 intel_cqm_event_count(struct perf_event *event)
if (!cqm_group_leader(event))
return 0;

/*
* Getting up-to-date values requires an SMP IPI which is not
* possible if we're being called in interrupt context. Return
* the cached values instead.
*/
if (unlikely(in_interrupt()))
goto out;

/*
* Notice that we don't perform the reading of an RMID
* atomically, because we can't hold a spin lock across the
Expand Down

0 comments on commit 2579d01

Please sign in to comment.