aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-07-16 03:46:30 -0400
committerIngo Molnar <mingo@elte.hu>2007-07-16 03:46:30 -0400
commitf9153ee6c71cb9ab38de3b8ed66b1c3fa27c3f7d (patch)
tree77a00afe63230a59f7e10cd034eb467bbb1d5430 /kernel/sched.c
parent5926c50b83b626991c8c38efbca2020ee96b215f (diff)
[PATCH] sched: improve weight-array comments
improve the comments around the wmult array (which controls the weight of niced tasks). Clarify that to achieve a 10% difference in CPU utilization, a weight multiplier of 1.25 has to be used. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3332bbb5d5cf..a7284bc79cdf 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -736,7 +736,9 @@ static void update_curr_load(struct rq *rq, u64 now)
736 * 736 *
737 * The "10% effect" is relative and cumulative: from _any_ nice level, 737 * The "10% effect" is relative and cumulative: from _any_ nice level,
738 * if you go up 1 level, it's -10% CPU usage, if you go down 1 level 738 * if you go up 1 level, it's -10% CPU usage, if you go down 1 level
739 * it's +10% CPU usage. 739 * it's +10% CPU usage. (to achieve that we use a multiplier of 1.25.
740 * If a task goes up by ~10% and another task goes down by ~10% then
741 * the relative distance between them is ~25%.)
740 */ 742 */
741static const int prio_to_weight[40] = { 743static const int prio_to_weight[40] = {
742/* -20 */ 88818, 71054, 56843, 45475, 36380, 29104, 23283, 18626, 14901, 11921, 744/* -20 */ 88818, 71054, 56843, 45475, 36380, 29104, 23283, 18626, 14901, 11921,