Skip to content

Commit 5c33386

Browse files
Arun R BharadwajKAGA-KOKO
authored andcommitted
timers: Identifying the existing pinned timers
* Arun R Bharadwaj <[email protected]> [2009-04-16 12:11:36]: The following pinned hrtimers have been identified and marked: 1)sched_rt_period_timer 2)tick_sched_timer 3)stack_trace_timer_fn [ tglx: fixup the hrtimer pinned mode ] Signed-off-by: Arun R Bharadwaj <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 597d027 commit 5c33386

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

arch/x86/kernel/apic/x2apic_uv_x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ static void uv_heartbeat(unsigned long ignored)
463463
uv_set_scir_bits(bits);
464464

465465
/* enable next timer period */
466-
mod_timer(timer, jiffies + SCIR_CPU_HB_INTERVAL);
466+
mod_timer_pinned(timer, jiffies + SCIR_CPU_HB_INTERVAL);
467467
}
468468

469469
static void __cpuinit uv_heartbeat_enable(int cpu)

kernel/sched.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
244244
hard = hrtimer_get_expires(&rt_b->rt_period_timer);
245245
delta = ktime_to_ns(ktime_sub(hard, soft));
246246
__hrtimer_start_range_ns(&rt_b->rt_period_timer, soft, delta,
247-
HRTIMER_MODE_ABS, 0);
247+
HRTIMER_MODE_ABS_PINNED, 0);
248248
}
249249
spin_unlock(&rt_b->rt_runtime_lock);
250250
}
@@ -1154,7 +1154,7 @@ static __init void init_hrtick(void)
11541154
static void hrtick_start(struct rq *rq, u64 delay)
11551155
{
11561156
__hrtimer_start_range_ns(&rq->hrtick_timer, ns_to_ktime(delay), 0,
1157-
HRTIMER_MODE_REL, 0);
1157+
HRTIMER_MODE_REL_PINNED, 0);
11581158
}
11591159

11601160
static inline void init_hrtick(void)

kernel/time/tick-sched.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ void tick_nohz_stop_sched_tick(int inidle)
349349

350350
if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
351351
hrtimer_start(&ts->sched_timer, expires,
352-
HRTIMER_MODE_ABS);
352+
HRTIMER_MODE_ABS_PINNED);
353353
/* Check, if the timer was already in the past */
354354
if (hrtimer_active(&ts->sched_timer))
355355
goto out;
@@ -395,7 +395,7 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
395395

396396
if (ts->nohz_mode == NOHZ_MODE_HIGHRES) {
397397
hrtimer_start_expires(&ts->sched_timer,
398-
HRTIMER_MODE_ABS);
398+
HRTIMER_MODE_ABS_PINNED);
399399
/* Check, if the timer was already in the past */
400400
if (hrtimer_active(&ts->sched_timer))
401401
break;
@@ -698,7 +698,8 @@ void tick_setup_sched_timer(void)
698698

699699
for (;;) {
700700
hrtimer_forward(&ts->sched_timer, now, tick_period);
701-
hrtimer_start_expires(&ts->sched_timer, HRTIMER_MODE_ABS);
701+
hrtimer_start_expires(&ts->sched_timer,
702+
HRTIMER_MODE_ABS_PINNED);
702703
/* Check, if the timer was already in the past */
703704
if (hrtimer_active(&ts->sched_timer))
704705
break;

kernel/trace/trace_sysprof.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ static void start_stack_timer(void *unused)
203203
hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
204204
hrtimer->function = stack_trace_timer_fn;
205205

206-
hrtimer_start(hrtimer, ns_to_ktime(sample_period), HRTIMER_MODE_REL);
206+
hrtimer_start(hrtimer, ns_to_ktime(sample_period),
207+
HRTIMER_MODE_REL_PINNED);
207208
}
208209

209210
static void start_stack_timers(void)

0 commit comments

Comments
 (0)