lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] tick/sched: Set last_tick in init paths
Date
This eliminates the need to save last_tick on nohz entry.

Signed-off-by: Scott Wood <swood@redhat.com>
---
kernel/time/tick-sched.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 8936b604dd6c..59e663e240fc 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -794,7 +794,6 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
calc_load_nohz_start();
quiet_vmstat();

- ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
ts->tick_stopped = 1;
trace_tick_stop(1, TICK_DEP_MASK_NONE);
}
@@ -1248,6 +1247,7 @@ static void tick_nohz_switch_to_nohz(void)

hrtimer_set_expires(&ts->sched_timer, next);
hrtimer_forward_now(&ts->sched_timer, tick_period);
+ ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1);
tick_nohz_activate(ts, NOHZ_MODE_LOWRES);
}
@@ -1355,6 +1355,7 @@ void tick_setup_sched_timer(void)
}

hrtimer_forward(&ts->sched_timer, now, tick_period);
+ ts->last_tick = hrtimer_get_expires(&ts->sched_timer);
hrtimer_start_expires(&ts->sched_timer, HRTIMER_MODE_ABS_PINNED_HARD);
tick_nohz_activate(ts, NOHZ_MODE_HIGHRES);
}
--
1.8.3.1
\
 
 \ /
  Last update: 2019-12-17 00:23    [W:0.104 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site