linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Gabriele Mazzotta <gabriele.mzt@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Revert "cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo"
Date: Mon, 06 Aug 2018 09:49:29 -0700	[thread overview]
Message-ID: <cd2287153b369d88cc240068adc7d341ef675acf.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0iwhVu6PwztsbN8cYmQtnjD2SyFkazkObc1o-1JX6GO5g@mail.gmail.com>

On Mon, 2018-08-06 at 10:30 +0200, Rafael J. Wysocki wrote:
> On Sat, Aug 4, 2018 at 7:31 PM, Gabriele Mazzotta
> <gabriele.mzt@gmail.com> wrote:
> > On 04/08/2018 17:29, Gabriele Mazzotta wrote:
> > > This change does not take into account that some BIOSes change
> > > MSR_IA32_MISC_ENABLE_TURBO_DISABLE depending on the power source.
> > > If the turbo is disabled when the system boots, policy.max_freq
> > > is set to pstate.max_pstate. However, if the BIOS later enables
> > > the turbo, the CPU will never be able to run at
> > > pstate.turbo_pstate.
> > > 
> > > Since now intel_pstate_set_policy() does its calculations using
> > > pstate.max_freq and pstate.turbo_freq, we can always calculate
> > > cpuinfo.max_freq using pstate.turbo_pstate, thus allowing system
> > > with varying MSR_IA32_MISC_ENABLE_TURBO_DISABLE to run at full
> > > speed when the turbo is enabled.
> 
> Well, the problem with this approach is that always using
> pstate.turbo_pstate as the max causes the governor to overestimate
> the
> target frequency when the turbo range is not available (the target
> depends on the width of the entire available P-state range including
> turbo, so if the turbo range is not available, the number take into
> that computation is too large).
> 
> Are we expected to get notified when the BIOS updates
> MSR_IA32_MISC_ENABLE_TURBO_DISABLE?

Let's try this:
- boot with kernel command line 

intel_pstate=support_acpi_ppc dyndbg="file processor_perflib.c +p"
dyndbg="file intel_pstate.c +p"

and send dmesg after you change power sources.

- Also try with
intel_pstate=disable dyndbg="file processor_perflib.c +p"

and send dmesg.

Thanks,
Srinivas



  reply	other threads:[~2018-08-06 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04 15:29 [PATCH] Revert "cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo" Gabriele Mazzotta
2018-08-04 17:31 ` Gabriele Mazzotta
2018-08-06  8:30   ` Rafael J. Wysocki
2018-08-06 16:49     ` Srinivas Pandruvada [this message]
2018-08-06 21:50       ` Gabriele Mazzotta
2018-08-06 22:11         ` Srinivas Pandruvada
2018-08-07 20:12           ` Gabriele Mazzotta
2018-08-07 21:22             ` Srinivas Pandruvada
2018-08-07 22:05               ` Gabriele Mazzotta

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=cd2287153b369d88cc240068adc7d341ef675acf.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=gabriele.mzt@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).