From: Scott Wood <swood@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Scott Wood <swood@redhat.com>
Subject: [PATCH 2/4] tick/sched: Set last_tick in init paths
Date: Mon, 16 Dec 2019 18:22:23 -0500 [thread overview]
Message-ID: <1576538545-13274-2-git-send-email-swood@redhat.com> (raw)
In-Reply-To: <1576538545-13274-1-git-send-email-swood@redhat.com>
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
next prev parent reply other threads:[~2019-12-16 23:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 23:22 [PATCH 1/4] tick/sched: Forward timer even in nohz mode Scott Wood
2019-12-16 23:22 ` Scott Wood [this message]
2019-12-16 23:22 ` [PATCH 3/4] sched/core: Don't skip remote tick for idle cpus Scott Wood
2019-12-16 23:22 ` [PATCH 4/4] timers/nohz: Update nohz load in remote tick Scott Wood
2020-01-07 9:26 ` Peter Zijlstra
2020-01-06 20:12 ` [PATCH 1/4] tick/sched: Forward timer even in nohz mode Scott Wood
2020-01-06 22:18 ` Frederic Weisbecker
2020-01-08 23:18 ` Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1576538545-13274-2-git-send-email-swood@redhat.com \
--to=swood@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.