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-next>] [day] [month] [year] [list]
Message-ID: <6254683.2O5gIZElE2@kreacher>
Date:   Tue, 16 Jul 2019 17:25:10 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Linux PM <linux-pm@...r.kernel.org>
Cc:     Thomas Lindroth <thomas.lindroth@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Frederic Weisbecker <frederic@...nel.org>
Subject: [PATCH] cpuidle: Always stop scheduler tick on adaptive-tick CPUs

From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Running the scheduler tick on idle adaptive-tick CPUs is not useful
and it may also be not expected by users (as reported by Thomas), so
add a check to cpuidle_idle_call() to always stop the tick on them
regardless of the idle duration predicted by the governor.

Fixes: 554c8aa8ecad ("sched: idle: Select idle state before stopping the tick")
Reported-by: Thomas Lindroth <thomas.lindroth@...il.com>
Tested-by: Thomas Lindroth <thomas.lindroth@...il.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
 kernel/sched/idle.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-pm/kernel/sched/idle.c
===================================================================
--- linux-pm.orig/kernel/sched/idle.c
+++ linux-pm/kernel/sched/idle.c
@@ -191,7 +191,8 @@ static void cpuidle_idle_call(void)
 		 */
 		next_state = cpuidle_select(drv, dev, &stop_tick);
 
-		if (stop_tick || tick_nohz_tick_stopped())
+		if (stop_tick || tick_nohz_tick_stopped() ||
+		    !housekeeping_cpu(dev->cpu, HK_FLAG_TICK))
 			tick_nohz_idle_stop_tick();
 		else
 			tick_nohz_idle_retain_tick();



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ