提交 f333fdc9 编写于 作者: M Mike Galbraith 提交者: Ingo Molnar

sched: make !hrtick faster

it is safe to ignore timers and flags when the feature is disabled.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 45c01e82
......@@ -4134,7 +4134,7 @@ asmlinkage void __sched schedule(void)
struct task_struct *prev, *next;
unsigned long *switch_count;
struct rq *rq;
int cpu;
int cpu, hrtick = sched_feat(HRTICK);
need_resched:
preempt_disable();
......@@ -4149,7 +4149,8 @@ asmlinkage void __sched schedule(void)
schedule_debug(prev);
hrtick_clear(rq);
if (hrtick)
hrtick_clear(rq);
/*
* Do the rq-clock update outside the rq lock:
......@@ -4197,7 +4198,8 @@ asmlinkage void __sched schedule(void)
} else
spin_unlock_irq(&rq->lock);
hrtick_set(rq);
if (hrtick)
hrtick_set(rq);
if (unlikely(reacquire_kernel_lock(current) < 0))
goto need_resched_nonpreemptible;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册