lkml.org 
[lkml]   [2007]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -rt 3/9] Fix jiffies wrap issue in update_times
In prior -rt verisons the last_tick value was called wall_jiffies 
and was initialized in this same way as below. If this value isn't
initialized the calc_load function gets skewed for several minutes
right after boot up. Skewed meaning always zero.

Signed-off-by: Daniel Walker <dwalker@mvista.com>

---
kernel/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.22/kernel/timer.c
===================================================================
--- linux-2.6.22.orig/kernel/timer.c
+++ linux-2.6.22/kernel/timer.c
@@ -987,7 +987,7 @@ void run_local_timers(void)
*/
static inline void update_times(void)
{
- static unsigned long last_tick;
+ static unsigned long last_tick = INITIAL_JIFFIES;
unsigned long ticks, flags;

/*
--
-
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/

\
 
 \ /
  Last update: 2007-07-30 04:51    [W:1.804 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site