Commit f333fdc9 authored by Mike Galbraith's avatar Mike Galbraith Committed by Ingo Molnar

sched: make !hrtick faster

it is safe to ignore timers and flags when the feature is disabled.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 45c01e82
...@@ -4134,7 +4134,7 @@ asmlinkage void __sched schedule(void) ...@@ -4134,7 +4134,7 @@ asmlinkage void __sched schedule(void)
struct task_struct *prev, *next; struct task_struct *prev, *next;
unsigned long *switch_count; unsigned long *switch_count;
struct rq *rq; struct rq *rq;
int cpu; int cpu, hrtick = sched_feat(HRTICK);
need_resched: need_resched:
preempt_disable(); preempt_disable();
...@@ -4149,6 +4149,7 @@ need_resched_nonpreemptible: ...@@ -4149,6 +4149,7 @@ need_resched_nonpreemptible:
schedule_debug(prev); schedule_debug(prev);
if (hrtick)
hrtick_clear(rq); hrtick_clear(rq);
/* /*
...@@ -4197,6 +4198,7 @@ need_resched_nonpreemptible: ...@@ -4197,6 +4198,7 @@ need_resched_nonpreemptible:
} else } else
spin_unlock_irq(&rq->lock); spin_unlock_irq(&rq->lock);
if (hrtick)
hrtick_set(rq); hrtick_set(rq);
if (unlikely(reacquire_kernel_lock(current) < 0)) if (unlikely(reacquire_kernel_lock(current) < 0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment