projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03e89e4
)
sched: optimize update_curr()
author
Peter Zijlstra
<a.p.zijlstra@chello.nl>
Tue, 16 Dec 2008 07:45:31 +0000
(08:45 +0100)
committer
Ingo Molnar
<mingo@elte.hu>
Tue, 16 Dec 2008 08:46:33 +0000
(09:46 +0100)
Impact: micro-optimization
Skip the hard work when there is none.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched_fair.c
b/kernel/sched_fair.c
index 928cd74cff0db3654ce2fc6c17bed61098afcbb5..5ad4440f0fc44798b84417fa56463dd19ad81267 100644
(file)
--- a/
kernel/sched_fair.c
+++ b/
kernel/sched_fair.c
@@
-492,6
+492,8
@@
static void update_curr(struct cfs_rq *cfs_rq)
* overflow on 32 bits):
*/
delta_exec = (unsigned long)(now - curr->exec_start);
+ if (!delta_exec)
+ return;
__update_curr(cfs_rq, curr, delta_exec);
curr->exec_start = now;