Commit e0e37c20 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Ingo Molnar
Browse files

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: default avatarArjan van de Ven <>
Signed-off-by: default avatarAndrew Morton <>
Reviewed-by: default avatarRik van Riel <>
Acked-by: default avatarPeter Zijlstra <>
LKML-Reference: <>
Signed-off-by: default avatarIngo Molnar <>
parent 8d63bf94
......@@ -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;
......@@ -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);
if (last_update_time)
*last_update_time = ktime_to_us(now);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment