Skip to content
Commit d86ee480 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds
Browse files

sched: optimize cond_resched()



Optimize cond_resched() by removing one conditional.

Currently cond_resched() checks system_state ==
SYSTEM_RUNNING in order to avoid scheduling before the
scheduler is running.

We can however, as per suggestion of Matt, use
PREEMPT_ACTIVE to accomplish that very same.

Suggested-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c99e6efe
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