lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 29 Apr 2017 18:06:40 +0200
From:   Mike Galbraith <efault@....de>
To:     LKML <linux-kernel@...r.kernel.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        "Paul E. McKenney" <paulmck@...ibm.com>,
        Ingo Molnar <mingo@...e.hu>,
        Thomas Gleixner <tglx@...utronix.de>,
        PeterZijlstra <peterz@...radead.org>,
        Frederic Weisbecker <fweisbec@...il.com>
Subject: [patch] timer: Fix timers_update_migration(), and call it in
 tmigr_init()

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@....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;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ