diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index a7284bc79cdf..90d22b72cf81 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -748,6 +748,13 @@ static const int prio_to_weight[40] = { | |||
748 | /* 10 */ 110, 87, 70, 56, 45, 36, 29, 23, 18, 15, | 748 | /* 10 */ 110, 87, 70, 56, 45, 36, 29, 23, 18, 15, |
749 | }; | 749 | }; |
750 | 750 | ||
751 | /* | ||
752 | * Inverse (2^32/x) values of the prio_to_weight[] array, precalculated. | ||
753 | * | ||
754 | * In cases where the weight does not change often, we can use the | ||
755 | * precalculated inverse to speed up arithmetics by turning divisions | ||
756 | * into multiplications: | ||
757 | */ | ||
751 | static const u32 prio_to_wmult[40] = { | 758 | static const u32 prio_to_wmult[40] = { |
752 | 48356, 60446, 75558, 94446, 118058, 147573, | 759 | 48356, 60446, 75558, 94446, 118058, 147573, |
753 | 184467, 230589, 288233, 360285, 450347, | 760 | 184467, 230589, 288233, 360285, 450347, |