mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
sched: make !hrtick faster
it is safe to ignore timers and flags when the feature is disabled. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
45c01e8249
commit
f333fdc909
1 changed files with 5 additions and 3 deletions
|
@ -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 @@ need_resched_nonpreemptible:
|
|||
|
||||
schedule_debug(prev);
|
||||
|
||||
hrtick_clear(rq);
|
||||
if (hrtick)
|
||||
hrtick_clear(rq);
|
||||
|
||||
/*
|
||||
* Do the rq-clock update outside the rq lock:
|
||||
|
@ -4197,7 +4198,8 @@ need_resched_nonpreemptible:
|
|||
} 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;
|
||||
|
|
Loading…
Reference in a new issue