Re: [2.6.16-mm1 patch] throttling tree patches



On Sat, 2006-03-25 at 11:37 +1100, Peter Williams wrote:
Mike Galbraith wrote:
Greetings,

I've broken down my throttling tree into 6 patches, which I'll send as
replies to this start-point.

Patch 1/6

Ignore timewarps caused by SMP timestamp rounding. Also, don't stamp a
task with a computed timestamp, stamp with the already called clock.

Signed-off-by: Mike Galbraith <efault@xxxxxx>

--- linux-2.6.16-mm1/kernel/sched.c.org 2006-03-23 15:01:41.000000000 +0100
+++ linux-2.6.16-mm1/kernel/sched.c 2006-03-23 15:02:25.000000000 +0100
@@ -805,6 +805,16 @@
unsigned long long __sleep_time = now - p->timestamp;
unsigned long sleep_time;

+ /*
+ * On SMP systems, a task can go to sleep on one CPU and
+ * wake up on another. When this happens, the timestamp
+ * is rounded to the nearest tick,

Is this true? There's no rounding that I can see.

Instrumenting it looked the same as rounding down, putting now in the
past was the result.

Of course, that doesn't mean that this chunk of code isn't required just
that the comment is misleading.

I'm not attached to the comment.

-Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [ANNOUNCE/RFC] Really Fair Scheduler
    ... surprised why you focus on rounding so much (and why you attack CFS's ... The main reason i'm interested in changing the fairness math under CFS ... Now your patch does not actually do it that way in a clearly discernible ...
    (Linux-Kernel)
  • Re: x86: Clean up computation of HPET .mult variables
    ... The one concern I have is the rounding that is done in the ... so there is no difference at all at this precision level! ... Out of curiosity I computed the "exact" value by hand and ... And if you look at the patch to do computation using ...
    (Linux-Kernel)
  • [2.6.16-mm1 patch] throttling tree patches
    ... Patch 1/6 ... Ignore timewarps caused by SMP timestamp rounding. ... task with a computed timestamp, stamp with the already called clock. ... This checks to make sure it's not an uninterruptible task ...
    (Linux-Kernel)
  • Re: x86: Clean up computation of HPET .mult variables
    ... So I think you will be ok with the patch now, ... I don't think this is due to rounding .. ... so, using Kcalc I get for shift 22 (the "exact" value, no rounding) ...
    (Linux-Kernel)
  • Re: [PATCH] LED: add LED heartbeat trigger
    ... The rounding ... I'll post a new patch soon. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)