From: Mike Galbraith <efault@gmx.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
"Paul E. McKenney" <paulmck@us.ibm.com>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
PeterZijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [patch] timer: Fix timers_update_migration(), and call it in tmigr_init()
Date: Sat, 29 Apr 2017 18:06:40 +0200 [thread overview]
Message-ID: <1493482000.4547.6.camel@gmx.de> (raw)
In-Reply-To: <1493209836.21594.29.camel@gmx.de>
Note: there is more. With this applied, my desktop box will no longer
reproduce when booted to init 3 with nowatchdog on the command line.
My 8 socket DL980 OTOH still will, though it takes longer, and is
seemingly no longer interested in following up with a permanent RCU
stall after the tsc clocksource is killed, as it does in virgin source.
---
timers_update_migration() is called by tick_nohz_activate() before
the late initcall tmigr_init() sets tmigr_enabled to true, resulting
in it updating neither timer_base.nohz_active nor .migration_enabled,
meaning we'll not kick an idling cpu in add_timer_on().
Remove redundant loop avoidance such that tick_nohz_activate() updates
timer_bases[].nohz_active as intended, and call it in tmigr_init() to
update timer_bases[].migration_enabled.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Fixes: ec2206b91d43 timer: Implement the hierarchical pull model
---
kernel/time/timer.c | 4 ----
kernel/time/timer_migration.c | 1 +
2 files changed, 1 insertion(+), 4 deletions(-)
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -224,10 +224,6 @@ void timers_update_migration(bool update
bool on = sysctl_timer_migration && tick_nohz_active && tmigr_enabled;
unsigned int cpu;
- /* Avoid the loop, if nothing to update */
- if (this_cpu_read(timer_bases[BASE_GLOBAL].migration_enabled) == on)
- return;
-
for_each_possible_cpu(cpu) {
per_cpu(timer_bases[BASE_LOCAL].migration_enabled, cpu) = on;
per_cpu(timer_bases[BASE_GLOBAL].migration_enabled, cpu) = on;
--- a/kernel/time/timer_migration.c
+++ b/kernel/time/timer_migration.c
@@ -649,6 +649,7 @@ static int __init tmigr_init(void)
goto hp_err;
tmigr_enabled = true;
+ timers_update_migration(false);
pr_info("Timer migration: %d hierarchy levels\n", tmigr_hierarchy_levels);
return 0;
next prev parent reply other threads:[~2017-04-29 16:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 8:02 x86-tip tsc/tick gripage Mike Galbraith
2017-04-26 8:16 ` Mike Galbraith
2017-04-26 8:21 ` Ingo Molnar
2017-04-26 8:31 ` Mike Galbraith
2017-04-26 8:57 ` Mike Galbraith
2017-04-26 9:18 ` Mike Galbraith
2017-04-26 10:26 ` Peter Zijlstra
2017-04-26 11:39 ` Mike Galbraith
2017-04-26 12:30 ` Mike Galbraith
2017-04-26 18:13 ` Mike Galbraith
2017-04-27 5:26 ` Mike Galbraith
2017-04-29 16:06 ` Mike Galbraith [this message]
2017-04-29 18:06 ` [patch] timer: Fix timers_update_migration(), and call it in tmigr_init() Paul E. McKenney
2017-04-29 18:20 ` Mike Galbraith
2017-04-29 21:45 ` Paul E. McKenney
2017-04-30 1:21 ` Mike Galbraith
2017-04-30 3:43 ` Paul E. McKenney
2017-04-30 4:20 ` Mike Galbraith
2017-04-30 4:36 ` Paul E. McKenney
2017-04-30 22:41 ` Paul E. McKenney
2017-05-01 7:54 ` Thomas Gleixner
2017-05-01 19:33 ` Paul E. McKenney
2017-04-30 5:07 ` Mike Galbraith
2017-04-28 7:35 ` [patch] Re: x86-tip tsc/tick gripage Mike Galbraith
2017-04-28 8:45 ` Mike Galbraith
2017-04-28 14:17 ` Mike Galbraith
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=1493482000.4547.6.camel@gmx.de \
--to=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@kernel.org \
--cc=paulmck@us.ibm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox