提交 94a57140 编写于 作者: F Frederic Weisbecker

tick: Conditionally build nohz specific code in tick handler

This optimize a bit the high res tick sched handler.
Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
上级 9e8f559b
...@@ -122,6 +122,7 @@ static void tick_sched_do_timer(ktime_t now) ...@@ -122,6 +122,7 @@ static void tick_sched_do_timer(ktime_t now)
static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
{ {
#ifdef CONFIG_NO_HZ
/* /*
* When we are idle and the tick is stopped, we have to touch * When we are idle and the tick is stopped, we have to touch
* the watchdog as we might not schedule for a really long * the watchdog as we might not schedule for a really long
...@@ -135,6 +136,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs) ...@@ -135,6 +136,7 @@ static void tick_sched_handle(struct tick_sched *ts, struct pt_regs *regs)
if (is_idle_task(current)) if (is_idle_task(current))
ts->idle_jiffies++; ts->idle_jiffies++;
} }
#endif
update_process_times(user_mode(regs)); update_process_times(user_mode(regs));
profile_tick(CPU_PROFILING); profile_tick(CPU_PROFILING);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册