mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* PATCH: time is ulong
@ 2003-03-21 20:02 Alan Cox
  2003-03-21 21:35 ` Roland Dreier
  2003-03-21 22:08 ` Tim Schmielau
  0 siblings, 2 replies; 3+ messages in thread
From: Alan Cox @ 2003-03-21 20:02 UTC (permalink / raw)
  To: linux-kernel, torvalds

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux-2.5.65/include/linux/time.h linux-2.5.65-ac2/include/linux/time.h
--- linux-2.5.65/include/linux/time.h	2003-03-06 17:04:37.000000000 +0000
+++ linux-2.5.65-ac2/include/linux/time.h	2003-03-07 14:57:13.000000000 +0000
@@ -31,7 +31,7 @@
  * Have the 32 bit jiffies value wrap 5 minutes after boot
  * so jiffies wrap bugs show up earlier.
  */
-#define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
+#define INITIAL_JIFFIES ((unsigned long) (-300*HZ))
 
 /*
  * Change timeval to jiffies, trying to avoid the

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: time is ulong
  2003-03-21 20:02 PATCH: time is ulong Alan Cox
@ 2003-03-21 21:35 ` Roland Dreier
  2003-03-21 22:08 ` Tim Schmielau
  1 sibling, 0 replies; 3+ messages in thread
From: Roland Dreier @ 2003-03-21 21:35 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

  > -#define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
  > +#define INITIAL_JIFFIES ((unsigned long) (-300*HZ))

My understanding is that this (unsigned int) is intentional.  The goal
is for only the low 32 bits of jiffies to overflow, even on 64 bit
architectures.

 - Roland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: time is ulong
  2003-03-21 20:02 PATCH: time is ulong Alan Cox
  2003-03-21 21:35 ` Roland Dreier
@ 2003-03-21 22:08 ` Tim Schmielau
  1 sibling, 0 replies; 3+ messages in thread
From: Tim Schmielau @ 2003-03-21 22:08 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, torvalds

> -#define INITIAL_JIFFIES ((unsigned int) (-300*HZ))
> +#define INITIAL_JIFFIES ((unsigned long) (-300*HZ))

No. This was deliberate since testing 32 bit jiffies wrap seems more
beneficial than testing 64 bit jiffies.
Just the formulation might be misleading, which is why I initially wrote
  #define INITIAL_JIFFIES (0xffffffffUL & (unsigned long)(-300*HZ))

Tim


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-21 21:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 20:02 PATCH: time is ulong Alan Cox
2003-03-21 21:35 ` Roland Dreier
2003-03-21 22:08 ` Tim Schmielau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®