diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2010-05-09 11:24:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-05-09 13:35:26 -0400 |
commit | e0e37c200f1357db0dd986edb359c41c57d24f6e (patch) | |
tree | 9f799889b2166528e4b264f3c58a52d1edbd4bdf | |
parent | 8d63bf949e330588b80d30ca8f0a27a45297a9e9 (diff) |
sched: Eliminate the ts->idle_lastupdate field
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>
-rw-r--r-- | include/linux/tick.h | 1 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 5 |
2 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h index d2ae79e21be3..0343eed40619 100644 --- a/include/linux/tick.h +++ b/include/linux/tick.h | |||
@@ -60,7 +60,6 @@ struct tick_sched { | |||
60 | ktime_t idle_waketime; | 60 | ktime_t idle_waketime; |
61 | ktime_t idle_exittime; | 61 | ktime_t idle_exittime; |
62 | ktime_t idle_sleeptime; | 62 | ktime_t idle_sleeptime; |
63 | ktime_t idle_lastupdate; | ||
64 | ktime_t sleep_length; | 63 | ktime_t sleep_length; |
65 | unsigned long last_jiffies; | 64 | unsigned long last_jiffies; |
66 | unsigned long next_jiffies; | 65 | unsigned long next_jiffies; |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index e86e1c6674d1..50953f4c42b2 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -158,16 +158,13 @@ update_ts_time_stats(struct tick_sched *ts, ktime_t now, u64 *last_update_time) | |||
158 | { | 158 | { |
159 | ktime_t delta; | 159 | ktime_t delta; |
160 | 160 | ||
161 | ts->idle_lastupdate = now; | ||
162 | if (ts->idle_active) { | 161 | if (ts->idle_active) { |
163 | delta = ktime_sub(now, ts->idle_entrytime); | 162 | delta = ktime_sub(now, ts->idle_entrytime); |
164 | ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); | 163 | ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta); |
165 | ts->idle_entrytime = now; | 164 | ts->idle_entrytime = now; |
166 | } | 165 | } |
167 | 166 | ||
168 | if (ts->idle_active && last_update_time) | 167 | if (last_update_time) |
169 | *last_update_time = ktime_to_us(ts->idle_lastupdate); | ||
170 | else | ||
171 | *last_update_time = ktime_to_us(now); | 168 | *last_update_time = ktime_to_us(now); |
172 | 169 | ||
173 | } | 170 | } |