[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: preempt-timing-2.6.8-rc1
From:       William Lee Irwin III <wli () holomorphy ! com>
Date:       2004-07-13 12:53:31
Message-ID: 20040713125331.GA21066 () holomorphy ! com
[Download RAW message or body]

William Lee Irwin III wrote:
>>+		unsigned long preempt_exit
>>+				= (unsigned long)__builtin_return_address(0);
>>+		hold = sched_clock() - __get_cpu_var(preempt_timings) + 
>>999999;
>>+		do_div(hold, 1000000);
>>+		if (preempt_thresh && hold > preempt_thresh &&
>>+							printk_ratelimit()) {

On Tue, Jul 13, 2004 at 10:51:24PM +1000, Nick Piggin wrote:
> This looks wrong. This means hold times of 1ns to 1000000ns trigger the
> exceeded 1ms threshold, 1000001 to 2000000 trigger the 2ms one, etc.
> Removing the + 999999 gives the correct result:
> 1000000 - 1999999ns triggers the 1ms threshold
> 2000000 - 2999999ns triggers the 2ms threshold
> etc
> Or have I missed something?

AFAICT this is nothing more than rounding up.


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

Configure | About | News | Add a list | Sponsored by KoreLogic