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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 May 2009 11:57:33 GMT
From:	tip-bot for Eero Nurkkala <ext-eero.nurkkala@...ia.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	venkatesh.pallipadi@...el.com, riel@...hat.com,
	tero.kristo@...ia.com, ext-eero.nurkkala@...ia.com,
	tglx@...utronix.de
Subject: [tip:timers/urgent] NOHZ: Properly feed cpufreq ondemand governor

Commit-ID:  4e67ac87c460a3c876019fa05149591122ec5287
Gitweb:     http://git.kernel.org/tip/4e67ac87c460a3c876019fa05149591122ec5287
Author:     Eero Nurkkala <ext-eero.nurkkala@...ia.com>
AuthorDate: Mon, 25 May 2009 09:57:37 +0300
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 27 May 2009 13:55:00 +0200

NOHZ: Properly feed cpufreq ondemand governor

A call from irq_exit() may occasionally pause the timing
info for cpufreq ondemand governor. This results in the
cpufreq ondemand governor to fail to calculate the
system load properly. Thus, relocate the checks for this
particular case to keep the governor always functional.

[ tglx: moved the check to the top of the function ]

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@...ia.com>
Reported-by: Tero Kristo <tero.kristo@...ia.com>
Acked-by: Rik van Riel <riel@...hat.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>
LKML-Reference: <12432346571351-git-send-email-ext-eero.nurkkala@...ia.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>


---
 kernel/time/tick-sched.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index d3f1ef4..d3d6f3f 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -218,8 +218,15 @@ void tick_nohz_stop_sched_tick(int inidle)
 	struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
 	int cpu;
 
-	local_irq_save(flags);
+	/*
+	 * Call to tick_nohz_start_idle stops the last_update_time from being
+	 * updated. Thus, it must not be called in the event we are called from
+	 * irq_exit() with the prior state different than idle.
+	 */
+	if (!inidle && !ts->inidle)
+		return;
 
+	local_irq_save(flags);
 	cpu = smp_processor_id();
 	ts = &per_cpu(tick_cpu_sched, cpu);
 	now = tick_nohz_start_idle(ts);
@@ -239,9 +246,6 @@ void tick_nohz_stop_sched_tick(int inidle)
 	if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE))
 		goto end;
 
-	if (!inidle && !ts->inidle)
-		goto end;
-
 	ts->inidle = 1;
 
 	if (need_resched())
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ