Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339103
b: refs/heads/master
c: 9e8f559
h: refs/heads/master
i:
  339101: 3934d97
  339099: 4042052
  339095: 79ed27e
  339087: cbf1f4e
  339071: 84317de
v: v3
  • Loading branch information
Frederic Weisbecker committed Oct 15, 2012
1 parent d80a0e2 commit 8fcfcc1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 34 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: 5bb962269c29cbb878414cddf0ebdff8c5cdef0a
refs/heads/master: 9e8f559b08cbc1cfcbf093840a2a760a946cb90f
55 changes: 22 additions & 33 deletions trunk/kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,25 @@ static void tick_sched_do_timer(ktime_t now)
tick_do_update_jiffies64(now);
}

static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
{
/*
* When we are idle and the tick is stopped, we have to touch
* the watchdog as we might not schedule for a really long
* time. This happens on complete idle SMP systems while
* waiting on the login prompt. We also increment the "start of
* idle" jiffy stamp so the idle accounting adjustment we do
* when we go busy again does not account too much ticks.
*/
if (ts->tick_stopped) {
touch_softlockup_watchdog();
if (is_idle_task(current))
ts->idle_jiffies++;
}
update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING);
}

/*
* NOHZ - aka dynamic tick functionality
*/
Expand Down Expand Up @@ -675,22 +694,7 @@ static void tick_nohz_handler(struct clock_event_device *dev)
dev->next_event.tv64 = KTIME_MAX;

tick_sched_do_timer(now);

/*
* When we are idle and the tick is stopped, we have to touch
* the watchdog as we might not schedule for a really long
* time. This happens on complete idle SMP systems while
* waiting on the login prompt. We also increment the "start
* of idle" jiffy stamp so the idle accounting adjustment we
* do when we go busy again does not account too much ticks.
*/
if (ts->tick_stopped) {
touch_softlockup_watchdog();
ts->idle_jiffies++;
}

update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING);
tick_sched_handle(ts, regs);

while (tick_nohz_reprogram(ts, now)) {
now = ktime_get();
Expand Down Expand Up @@ -818,23 +822,8 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
* Do not call, when we are not in irq context and have
* no valid regs pointer
*/
if (regs) {
/*
* When we are idle and the tick is stopped, we have to touch
* the watchdog as we might not schedule for a really long
* time. This happens on complete idle SMP systems while
* waiting on the login prompt. We also increment the "start of
* idle" jiffy stamp so the idle accounting adjustment we do
* when we go busy again does not account too much ticks.
*/
if (ts->tick_stopped) {
touch_softlockup_watchdog();
if (is_idle_task(current))
ts->idle_jiffies++;
}
update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING);
}
if (regs)
tick_sched_handle(ts, regs);

hrtimer_forward(timer, now, tick_period);

Expand Down

0 comments on commit 8fcfcc1

Please sign in to comment.