sched/fair: Use time_after() in record_wakee()
authorManuel Schölling <manuel.schoelling@gmx.de>
Thu, 22 May 2014 17:45:23 +0000 (19:45 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 Jun 2014 09:52:02 +0000 (11:52 +0200)
To be future-proof and for better readability the time comparisons are modified
to use time_after() instead of plain, error-prone math.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1400780723-24626-1-git-send-email-manuel.schoelling@gmx.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c

index 7a0c000b6005893b8957728a8bfdf25acc017f1e..c63dde9849563db94b63b8aa53a4cfc0a696dcc3 100644 (file)
@@ -4066,7 +4066,7 @@ static void record_wakee(struct task_struct *p)
         * about the boundary, really active task won't care
         * about the loss.
         */
-       if (jiffies > current->wakee_flip_decay_ts + HZ) {
+       if (time_after(jiffies, current->wakee_flip_decay_ts + HZ)) {
                current->wakee_flips >>= 1;
                current->wakee_flip_decay_ts = jiffies;
        }
This page took 0.028584 seconds and 5 git commands to generate.