Re: [PATCH] Avoid overflows in kernel/time.c (version 5)

2007-12-23 Thread Roman Zippel
Hi, On Monday 17 December 2007, H. Peter Anvin wrote: > kernel/timeconst.pl | 340 I agree with Jan that it would be better to put this into scripts. In the long term we could also detect some of the simple special cases, so we can finally inline some of these functions again, this

Re: [PATCH] Avoid overflows in kernel/time.c (version 5)

2007-12-23 Thread Roman Zippel
Hi, On Monday 17 December 2007, H. Peter Anvin wrote: kernel/timeconst.pl | 340 I agree with Jan that it would be better to put this into scripts. In the long term we could also detect some of the simple special cases, so we can finally inline some of these functions again, this

Re: [PATCH] Avoid overflows in kernel/time.c (version 5)

2007-12-22 Thread Andrew Morton
On Mon, 17 Dec 2007 13:53:23 -0800 "H. Peter Anvin" <[EMAIL PROTECTED]> wrote: > When the conversion factor between jiffies and milli- or microseconds > is not a single multiply or divide, as for the case of HZ == 300, we > currently do a multiply followed by a divide. The intervening > result,

Re: [PATCH] Avoid overflows in kernel/time.c (version 5)

2007-12-22 Thread Andrew Morton
On Mon, 17 Dec 2007 13:53:23 -0800 H. Peter Anvin [EMAIL PROTECTED] wrote: When the conversion factor between jiffies and milli- or microseconds is not a single multiply or divide, as for the case of HZ == 300, we currently do a multiply followed by a divide. The intervening result, however,

[PATCH] Avoid overflows in kernel/time.c (version 5)

2007-12-17 Thread H. Peter Anvin
When the conversion factor between jiffies and milli- or microseconds is not a single multiply or divide, as for the case of HZ == 300, we currently do a multiply followed by a divide. The intervening result, however, is subject to overflows, especially since the fraction is not simplified (for

[PATCH] Avoid overflows in kernel/time.c (version 5)

2007-12-17 Thread H. Peter Anvin
When the conversion factor between jiffies and milli- or microseconds is not a single multiply or divide, as for the case of HZ == 300, we currently do a multiply followed by a divide. The intervening result, however, is subject to overflows, especially since the fraction is not simplified (for