Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5714d2de93fbb156c5e45fb101a2b4f0cae8fbb7
Commit:     5714d2de93fbb156c5e45fb101a2b4f0cae8fbb7
Parent:     f9153ee6c71cb9ab38de3b8ed66b1c3fa27c3f7d
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 16 09:46:31 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Jul 16 09:46:31 2007 +0200

    [PATCH] sched: document prio_to_wmult[]
    
    document prio_to_wmult[].
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index a7284bc..90d22b7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to