Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62319
b: refs/heads/master
c: 3704540
h: refs/heads/master
i:
  62317: 0f35db7
  62315: c269def
  62311: 0cac246
  62303: b1e9f36
v: v3
  • Loading branch information
john stultz authored and Linus Torvalds committed Jul 22, 2007
1 parent 972a2c0 commit ea44fe4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 5590a536c0bc403fc73908c66c1c88cbed735ecb
refs/heads/master: 3704540b48295253bd9c87a5e7ff545f9d47a3b8
7 changes: 6 additions & 1 deletion trunk/kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ void tick_setup_sched_timer(void)
{
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
ktime_t now = ktime_get();
u64 offset;

/*
* Emulate tick processing via per-CPU hrtimers:
Expand All @@ -554,8 +555,12 @@ void tick_setup_sched_timer(void)
ts->sched_timer.function = tick_sched_timer;
ts->sched_timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;

/* Get the next period */
/* Get the next period (per cpu) */
ts->sched_timer.expires = tick_init_jiffy_update();
offset = ktime_to_ns(tick_period) >> 1;
do_div(offset, NR_CPUS);
offset *= smp_processor_id();
ts->sched_timer.expires = ktime_add_ns(ts->sched_timer.expires, offset);

for (;;) {
hrtimer_forward(&ts->sched_timer, now, tick_period);
Expand Down

0 comments on commit ea44fe4

Please sign in to comment.