From: dirk.brandewie@gmail.com
To: rjw@sisk.pl, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org
Cc: Dirk Brandewie <dirk.j.brandewie@intel.com>, stable@vger.kernel.org
Subject: [PATCH 3/6] cpufreq/intel_pstate: fix ffmpeg regression
Date: Tue, 7 May 2013 08:20:27 -0700 [thread overview]
Message-ID: <1367940030-19311-4-git-send-email-dirk.j.brandewie@gmail.com> (raw)
In-Reply-To: <1367940030-19311-1-git-send-email-dirk.j.brandewie@gmail.com>
From: Dirk Brandewie <dirk.j.brandewie@intel.com>
The ffmpeg benchmark in the phoronix test suite has threads on
multiple cores that rely on the progress on of threads on other cores
and ping pong back and forth fast enough to make the core appear less
busy than it "should" be. If the core has been at minimum p-state for
a while bump the pstate up to kick the core to see if it is in this
ping pong state. If the core is truly idle the p-state will be
reduced at the next sample time. If the core makes more progress it
will send more work to the thread bringing both threads out of the
ping pong scenario and the p-state will be selected normally.
This fixes a performance regression of approximately 30%
Cc: stable@vger.kernel.org
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
---
drivers/cpufreq/intel_pstate.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index c0c98c2..97fbac2 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -551,22 +551,16 @@ static void intel_pstate_timer_func(unsigned long __data)
struct cpudata *cpu = (struct cpudata *) __data;
intel_pstate_sample(cpu);
+ intel_pstate_adjust_busy_pstate(cpu);
- if (!cpu->idle_mode)
- intel_pstate_adjust_busy_pstate(cpu);
- else
- intel_pstate_adjust_idle_pstate(cpu);
-
-#if defined(XPERF_FIX)
if (cpu->pstate.current_pstate == cpu->pstate.min_pstate) {
cpu->min_pstate_count++;
if (!(cpu->min_pstate_count % 5)) {
intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate);
- intel_pstate_idle_mode(cpu);
}
} else
cpu->min_pstate_count = 0;
-#endif
+
intel_pstate_set_sample_time(cpu);
}
--
1.7.7.6
next prev parent reply other threads:[~2013-05-07 15:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 15:20 [PATCH 0/6] Intel pstate driver update dirk.brandewie
2013-05-07 15:20 ` [PATCH 1/6] cpufreq/intel_pstate: remove idle time and duration from sample and calculations dirk.brandewie
2013-05-07 15:20 ` [PATCH 2/6] cpufreq/intel_pstate: use lowest requested max performance dirk.brandewie
2013-05-07 15:20 ` dirk.brandewie [this message]
2013-05-07 15:20 ` [PATCH 4/6] cpufreq/intel_pstate: Remove idle mode PID dirk.brandewie
2013-05-07 15:20 ` [PATCH 5/6] cpufreq/intel_pstate: Remove unused code dirk.brandewie
2013-05-07 15:20 ` [PATCH 6/6] cpufreq/intel_pstate: remove #ifdef MODULE compile fence dirk.brandewie
2013-05-08 0:07 ` [PATCH 0/6] Intel pstate driver update Rafael J. Wysocki
2013-05-08 0:21 ` Dirk Brandewie
2013-05-08 11:56 ` Rafael J. Wysocki
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=1367940030-19311-4-git-send-email-dirk.j.brandewie@gmail.com \
--to=dirk.brandewie@gmail.com \
--cc=cpufreq@vger.kernel.org \
--cc=dirk.j.brandewie@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®