Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60427
b: refs/heads/master
c: 5714d2d
h: refs/heads/master
i:
  60425: 8cb3635
  60423: dda887e
v: v3
  • Loading branch information
Ingo Molnar committed Jul 16, 2007
1 parent cb48f5d commit 393e55f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9153ee6c71cb9ab38de3b8ed66b1c3fa27c3f7d
refs/heads/master: 5714d2de93fbb156c5e45fb101a2b4f0cae8fbb7
7 changes: 7 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,13 @@ static const int prio_to_weight[40] = {
/* 10 */ 110, 87, 70, 56, 45, 36, 29, 23, 18, 15,
};

/*
* Inverse (2^32/x) values of the prio_to_weight[] array, precalculated.
*
* In cases where the weight does not change often, we can use the
* precalculated inverse to speed up arithmetics by turning divisions
* into multiplications:
*/
static const u32 prio_to_wmult[40] = {
48356, 60446, 75558, 94446, 118058, 147573,
184467, 230589, 288233, 360285, 450347,
Expand Down

0 comments on commit 393e55f

Please sign in to comment.