projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e89996a
)
sched: fix calc_delta_mine()
author
Ingo Molnar
<mingo@elte.hu>
Fri, 14 Mar 2008 21:20:01 +0000
(22:20 +0100)
committer
Ingo Molnar
<mingo@elte.hu>
Sat, 15 Mar 2008 02:02:50 +0000
(
03:02
+0100)
lw->weight can be 0 for a short time during bootup.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
kernel/sched.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched.c
b/kernel/sched.c
index 3a4ba3dc0f498fe71d04d7b33b8cfe086695d4a5..6b06f23261c0c37e5e616319bc0c76deed64affa 100644
(file)
--- a/
kernel/sched.c
+++ b/
kernel/sched.c
@@
-1084,7
+1084,7
@@
calc_delta_mine(unsigned long delta_exec, unsigned long weight,
u64 tmp;
if (unlikely(!lw->inv_weight))
- lw->inv_weight = (WMULT_CONST
- lw->weight/2) / lw->weight + 1
;
+ lw->inv_weight = (WMULT_CONST
-lw->weight/2) / (lw->weight+1)
;
tmp = (u64)delta_exec * weight;
/*