Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147639
b: refs/heads/master
c: 128f048
h: refs/heads/master
i:
  147637: b1f16c2
  147635: f19a68b
  147631: b4e77ef
v: v3
  • Loading branch information
Ingo Molnar committed Jun 3, 2009
1 parent b0e9399 commit 0b95ec2
Show file tree
Hide file tree
Showing 3 changed files with 16 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: 233f0b95ca3a0d1dcbd70bc7e519069a8e10d23e
refs/heads/master: 128f048f0f0d2a477ad2555e7acd2ad15a1b6061
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static u64 intel_pmu_raw_event(u64 event)
#define CORE_EVNTSEL_INV_MASK 0x00800000ULL
#define CORE_EVNTSEL_COUNTER_MASK 0xFF000000ULL

#define CORE_EVNTSEL_MASK \
#define CORE_EVNTSEL_MASK \
(CORE_EVNTSEL_EVENT_MASK | \
CORE_EVNTSEL_UNIT_MASK | \
CORE_EVNTSEL_EDGE_MASK | \
Expand Down
19 changes: 14 additions & 5 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2822,11 +2822,20 @@ int perf_counter_overflow(struct perf_counter *counter,

if (!throttle) {
counter->hw.interrupts++;
} else if (counter->hw.interrupts != MAX_INTERRUPTS) {
counter->hw.interrupts++;
if (HZ*counter->hw.interrupts > (u64)sysctl_perf_counter_limit) {
counter->hw.interrupts = MAX_INTERRUPTS;
perf_log_throttle(counter, 0);
} else {
if (counter->hw.interrupts != MAX_INTERRUPTS) {
counter->hw.interrupts++;
if (HZ*counter->hw.interrupts > (u64)sysctl_perf_counter_limit) {
counter->hw.interrupts = MAX_INTERRUPTS;
perf_log_throttle(counter, 0);
ret = 1;
}
} else {
/*
* Keep re-disabling counters even though on the previous
* pass we disabled it - just in case we raced with a
* sched-in and the counter got enabled again:
*/
ret = 1;
}
}
Expand Down

0 comments on commit 0b95ec2

Please sign in to comment.