public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem)
@ 2006-03-02 14:02 Atsushi Nemoto
  2006-03-02 15:51 ` Atsushi Nemoto
  2006-03-02 19:09 ` Christoph Lameter
  0 siblings, 2 replies; 36+ messages in thread
From: Atsushi Nemoto @ 2006-03-02 14:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, ralf

In kernel 2.6, update_times() is called directly in timer interrupt,
so there is no point calculating ticks here.  This also get rid of
difference of jiffies and jiffies_64 due to compiler's optimization
(which was reported previously with subject "jiffies_64 vs. jiffies").

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

diff --git a/kernel/timer.c b/kernel/timer.c
index fe3a9a9..6188c99 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -906,14 +906,9 @@ void run_local_timers(void)
  */
 static inline void update_times(void)
 {
-	unsigned long ticks;
-
-	ticks = jiffies - wall_jiffies;
-	if (ticks) {
-		wall_jiffies += ticks;
-		update_wall_time(ticks);
-	}
-	calc_load(ticks);
+	wall_jiffies++;
+	update_wall_time(1);
+	calc_load(1);
 }
   
 /*

---
Atsushi Nemoto

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

end of thread, other threads:[~2006-08-09 15:06 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-02 14:02 [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem) Atsushi Nemoto
2006-03-02 15:51 ` Atsushi Nemoto
2006-03-02 19:09 ` Christoph Lameter
2006-03-03  2:44   ` Atsushi Nemoto
2006-03-03  3:04     ` Andrew Morton
2006-03-03  3:20       ` Andi Kleen
2006-03-03  4:31       ` Atsushi Nemoto
2006-03-03  5:45         ` David S. Miller
2006-03-03 16:26           ` Atsushi Nemoto
2006-03-03 16:31         ` Atsushi Nemoto
2006-03-04  8:18           ` Andrew Morton
2006-03-04 11:20             ` Andi Kleen
2006-03-04 11:40               ` Andrew Morton
2006-03-04  5:21                 ` Andi Kleen
2006-03-04 23:13                 ` Paul Mackerras
2006-03-06  2:32                   ` Atsushi Nemoto
2006-03-04 11:42               ` Paul Mackerras
2006-03-04 11:44                 ` Andrew Morton
2006-03-04 12:33                   ` Paul Mackerras
2006-03-04 16:43                     ` Atsushi Nemoto
2006-03-03 20:17       ` john stultz
2006-03-03 21:15         ` Andrew Morton
2006-03-04 17:15         ` Atsushi Nemoto
2006-07-30 14:54           ` Atsushi Nemoto
2006-07-31 10:36             ` Martin Schwidefsky
2006-08-01 14:44               ` Atsushi Nemoto
2006-08-02 12:50                 ` Martin Schwidefsky
2006-08-03 15:53                   ` Atsushi Nemoto
2006-08-04 14:02                     ` Martin Schwidefsky
2006-08-06 16:13                       ` Atsushi Nemoto
2006-08-07 11:28                         ` Martin Schwidefsky
2006-08-07 19:58                         ` Andrew Morton
2006-08-08  8:11                           ` Martin Schwidefsky
2006-08-09 15:07                           ` Atsushi Nemoto
2006-03-03 18:13     ` john stultz
2006-03-04  2:34       ` Ralf Baechle

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