diff options
| author | Feng Tang <feng.tang@intel.com> | 2009-09-03 04:32:53 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2009-11-20 05:25:48 -0500 |
| commit | 8629ea2eaba8ca0de2e38ce1b4a825e16255976e (patch) | |
| tree | 8a4f16c0cdd069c808993e4701ca45590b35c611 | |
| parent | 8747d793fc5c4d3e4decd41d55f6dc24498dd5f5 (diff) | |
hrtimer: Fix /proc/timer_list regression
commit 507e1231 (timer stats: Optimize by adding quick check to avoid
function calls) introduced a regression in /proc/timer_list.
/proc/timer_list shows now
#0: <c27d46b0>, tick_sched_timer, S:01, <(null)>, /-1
instead of
#0: <c27d46b0>, tick_sched_timer, S:01, hrtimer_start, swapper/0
Revert the hrtimer quick check for now. The optimization needs more
thought, but this is neither 2.6.32-rc7 nor stable material.
[ tglx: - Removed unrelated changes from the original patch
- Prevent unneccesary call to timer_stats_update_stats
- massaged the changelog ]
Signed-off-by: Feng Tang <feng.tang@intel.com>
LKML-Reference: <alpine.LFD.2.00.0911181933540.24119@localhost.localdomain>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: stable@kernel.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| -rw-r--r-- | include/linux/hrtimer.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index ff037f0b1b4e..9bace4b9f4fe 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
| @@ -446,7 +446,7 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
| 446 | 446 | ||
| 447 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 447 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
| 448 | { | 448 | { |
| 449 | if (likely(!timer->start_site)) | 449 | if (likely(!timer_stats_active)) |
| 450 | return; | 450 | return; |
| 451 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 451 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
| 452 | timer->function, timer->start_comm, 0); | 452 | timer->function, timer->start_comm, 0); |
| @@ -457,8 +457,6 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | |||
| 457 | 457 | ||
| 458 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | 458 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
| 459 | { | 459 | { |
| 460 | if (likely(!timer_stats_active)) | ||
| 461 | return; | ||
| 462 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | 460 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); |
| 463 | } | 461 | } |
| 464 | 462 | ||
