use 64 bit jiffies broke HZ=100 case (and fix)

From: Oleg Drokin (green@namesys.com)
Date: Wed Feb 05 2003 - 06:42:06 EST


Hello!

On Sun, Feb 02, 2003 at 11:55:40PM +0100, Tim Schmielau wrote:
> Just a note that I have rediffed for 2.5.55 the patches that use the 64
> bit jiffies value to avoid uptime and process start time wrap after
> 49.5 days. I will push them Linus-wards when he's back.
> They can be retrieved from
> http://www.physik3.uni-rostock.de/tim/kernel/2.5/jiffies64-33a.patch.gz
> (1/3: infrastructure)
> http://www.physik3.uni-rostock.de/tim/kernel/2.5/jiffies64-33b.patch.gz
> (2/3: fix uptime wrap)
> http://www.physik3.uni-rostock.de/tim/kernel/2.5/jiffies64-33c.patch.gz
> (3/3: 64 bit process start time)

Unfortunatelly your changes in fs/proc/proc_misc.c broke every arch that
still uses HZ=100 (e.g. UML), because there is no "times" field in task
struct.
See this part:

+ {
+ unsigned long idle = init_task.times.tms_utime
+ + init_task.times.tms_stime;

In order to get UML to compile again (and pretty much any other HZ=100 arch)
I need to apply this patch below:

===== fs/proc/proc_misc.c 1.63 vs edited =====
--- 1.63/fs/proc/proc_misc.c Tue Nov 12 12:37:55 2002
+++ edited/fs/proc/proc_misc.c Wed Feb 5 14:28:50 2003
@@ -121,8 +121,7 @@
         }
 #else
         {
- unsigned long idle = init_task.times.tms_utime
- + init_task.times.tms_stime;
+ unsigned long idle = init_task.utime + init_task.stime;
 
                 len = sprintf(page,"%lu.%02lu %lu.%02lu\n",
                         (unsigned long) uptime,

Bye,
    Oleg
-
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/



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:17 EST