sched: Eliminate the ts->idle_lastupdate field
authorArjan van de Ven <arjan@linux.intel.com>
Sun, 9 May 2010 15:24:39 +0000 (08:24 -0700)
committerIngo Molnar <mingo@elte.hu>
Sun, 9 May 2010 17:35:26 +0000 (19:35 +0200)
Now that the only user of ts->idle_lastupdate is
update_ts_time_stats(), the entire field can be eliminated.

In update_ts_time_stats(), idle_lastupdate is first set to
"now", and a few lines later, the only user is an if() statement
that assigns a variable either to "now" or to
ts->idle_lastupdate, which has the value of "now" at that point.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: davej@redhat.com
LKML-Reference: <20100509082439.2fab0b4f@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/tick.h
kernel/time/tick-sched.c

index d2ae79e21be3a4aee4fe1cd8dde51d272d7b97dc..0343eed40619449e1a4d48d53abbf53c88bcadcf 100644 (file)
@@ -60,7 +60,6 @@ struct tick_sched {
        ktime_t                         idle_waketime;
        ktime_t                         idle_exittime;
        ktime_t                         idle_sleeptime;
-       ktime_t                         idle_lastupdate;
        ktime_t                         sleep_length;
        unsigned long                   last_jiffies;
        unsigned long                   next_jiffies;
index e86e1c6674d1c50b6505e0e47b4158b603a14bf4..50953f4c42b2620449cf8f11e90179a682d0e928 100644 (file)
@@ -158,16 +158,13 @@ update_ts_time_stats(struct tick_sched *ts, ktime_t now, u64 *last_update_time)
 {
        ktime_t delta;
 
-       ts->idle_lastupdate = now;
        if (ts->idle_active) {
                delta = ktime_sub(now, ts->idle_entrytime);
                ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta);
                ts->idle_entrytime = now;
        }
 
-       if (ts->idle_active && last_update_time)
-               *last_update_time = ktime_to_us(ts->idle_lastupdate);
-       else
+       if (last_update_time)
                *last_update_time = ktime_to_us(now);
 
 }