Blob Blame History Raw
From: Mel Gorman <mgorman@suse.de>
Date: Mon, 25 Sep 2017 13:34:28 +0100
Subject: [PATCH] cpufreq, ondemand: Set default up_threshold to 30 on multi-core systems

References: bnc#464461,bnc#981838,bnc#1064414,bnc#1144943
Patch-Mainline: Never, SLE only

Set default up_threshold to 30 on multi core systems.  This should avoid
effects where two CPU intensive threads are waiting on each other on
separate cores. On a single core machine these would all be processed on
one core resulting in higher utilization of the one core.

SLE12-SP2: This was observed to be particularly important for HP Proliant
        platforms using pcc-cpufreq. While it is recommended that OS
        Management be configured on such platforms, it may not be. Without
        this change, the sampling rate hammers overall performance with 9%
        of time spend calling ACPI functions even when idle. Furthermore,
        workqueue activity is insanely high where many of the workers then
        collide serialising on a waitqueue.

SLE15-SP2: This was observed to be important for AMD EPYC showing large
	differences in netperf and tbench in particular. For workloads like
	hackbench, it only makes a small difference for low thread counts.
	For pgbench, it makes a big difference at low thread counts. Note
	that when this was tested that AMD EPYC load balancing was still
	broken. pcc-cpufreq results were still pending and should be updated
	when complete. See results at
	http://laplace.suse.de/pt-master/SLE-15-SP2/0003-mgorman-acpi_cpufreq-30-threshold/dashboard.html

Signed-off-by: Mel Gorman <mgorman@suse.de>
---
 drivers/cpufreq/cpufreq_ondemand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 3937acf7e026..c705b3a7771e 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -24,7 +24,7 @@
 #define DEF_FREQUENCY_UP_THRESHOLD		(80)
 #define DEF_SAMPLING_DOWN_FACTOR		(1)
 #define MAX_SAMPLING_DOWN_FACTOR		(100000)
-#define MICRO_FREQUENCY_UP_THRESHOLD		(95)
+#define MICRO_FREQUENCY_UP_THRESHOLD		(30)
 #define MICRO_FREQUENCY_MIN_SAMPLE_RATE		(10000)
 #define MIN_FREQUENCY_UP_THRESHOLD		(1)
 #define MAX_FREQUENCY_UP_THRESHOLD		(100)