Re: [PATCH] fix potential jiffies overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 03, 2006 at 12:31:10PM +0900, Atsushi Nemoto wrote:
> >>>>> On Thu, 2 Mar 2006 18:45:02 -0800, Andrew Morton <[email protected]> said:
>  	sec = get_cmos_time() + clock_cmos_diff;
> -	sleep_length = (get_cmos_time() - sleep_start) * HZ;
> +	sleep_length = (u64)(get_cmos_time() - sleep_start) * HZ;

Calls to get_cmos_time() currently take an average of .5 seconds as it
waits for a clock edge to go by. I've got some patches queueing up to
eliminate this but it's probably worth caching the result here anyway.

-- 
Mathematics is the supreme nostalgia of our time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux