Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372925
b: refs/heads/master
c: 5811d99
h: refs/heads/master
i:
  372923: d8582f5
v: v3
  • Loading branch information
Frederic Weisbecker committed Apr 22, 2013
1 parent 41c02e4 commit 88531df
Show file tree
Hide file tree
Showing 2 changed files with 26 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: 9014c45d9e2dbb935498a5f1d106e220e8624643
refs/heads/master: 5811d9963e26146898a24b535b301f7654257f8a
31 changes: 25 additions & 6 deletions trunk/kernel/time/tick-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,24 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
return ret;
}

static void tick_nohz_full_stop_tick(struct tick_sched *ts)
{
#ifdef CONFIG_NO_HZ_FULL
int cpu = smp_processor_id();

if (!tick_nohz_full_cpu(cpu) || is_idle_task(current))
return;

if (!ts->tick_stopped && ts->nohz_mode == NOHZ_MODE_INACTIVE)
return;

if (!can_stop_full_tick())
return;

tick_nohz_stop_sched_tick(ts, ktime_get(), cpu);
#endif
}

static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
{
/*
Expand Down Expand Up @@ -773,12 +791,13 @@ void tick_nohz_irq_exit(void)
{
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);

if (!ts->inidle)
return;

/* Cancel the timer because CPU already waken up from the C-states*/
menu_hrtimer_cancel();
__tick_nohz_idle_enter(ts);
if (ts->inidle) {
/* Cancel the timer because CPU already waken up from the C-states*/
menu_hrtimer_cancel();
__tick_nohz_idle_enter(ts);
} else {
tick_nohz_full_stop_tick(ts);
}
}

/**
Expand Down

0 comments on commit 88531df

Please sign in to comment.