public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Pratyush Yadav <ptyadav@amazon.de>,
	linux-pm@vger.kernel.org, Len Brown <lenb@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Robert Moore <robert.moore@intel.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@acpica.org
Subject: Re: [PATCH 0/2] intel_pstate: fix turbo not being used after a processor is rebooted
Date: Tue, 27 Dec 2022 10:49:49 -0800	[thread overview]
Message-ID: <aad6d76a4a1bc986cb4187e041b9750d98196d80.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0hbiuvvP_HKnP5m0TBwGsN2-=32bMXTRUUanc4cFRJKwQ@mail.gmail.com>

On Tue, 2022-12-27 at 19:47 +0100, Rafael J. Wysocki wrote:
> On Tue, Dec 27, 2022 at 7:07 PM srinivas pandruvada
> <srinivas.pandruvada@linux.intel.com> wrote:
> > 
> > On Tue, 2022-12-27 at 18:02 +0100, Rafael J. Wysocki wrote:
> > > On Tue, Dec 27, 2022 at 5:40 PM srinivas pandruvada
> > > <srinivas.pandruvada@linux.intel.com> wrote:
> > > > 
> > > > On Tue, 2022-12-27 at 16:38 +0100, Pratyush Yadav wrote:
> > > > > Hi Srinivas,
> > > > > 
> > > > > On Sat, Dec 24 2022, srinivas pandruvada wrote:
> > > > > 
> > > > > > On Fri, 2022-12-23 at 10:10 -0800, srinivas pandruvada
> > > > > > wrote:
> > > > > > > Hi Pratyush,
> > > > > > > 
> > > > > > > On Thu, 2022-12-22 at 11:39 +0100, Pratyush Yadav wrote:
> > > > > > > > 
> > > > > > > > Hi Srinivas,
> > > > > > > > 
> > > > > > > > On Wed, Dec 21 2022, srinivas pandruvada wrote:
> > > > > > > > > On Wed, 2022-12-21 at 16:52 +0100, Pratyush Yadav
> > > > > > > > > wrote:
> > > > > > > > > > When a processor is brought offline and online
> > > > > > > > > > again,
> > > > > > > > > > it is
> > > > > > > > > > unable to
> > > > > > > > > > use Turbo mode because the _PSS table does not
> > > > > > > > > > contain
> > > > > > > > > > the
> > > > > > > > > > whole
> > > > > > > > > > turbo
> > > > > > > > > > frequency range, but only +1 MHz above the max non-
> > > > > > > > > > turbo
> > > > > > > > > > frequency.
> > > > > > > > > > This
> > > > > > > > > > causes problems when ACPI processor driver tries to
> > > > > > > > > > set
> > > > > > > > > > frequency
> > > > > > > > > > constraints. See patch 2 for more details.
> > > > > > > > > > 
> > > > > > > I can reproduce on a Broadwell server platform. But not
> > > > > > > on a
> > > > > > > client
> > > > > > > system with acpi_ppc usage.
> > > > > > > 
> > > > > > > Need to check what change broke this.
> > > > > > 
> > > > > > When PPC limits enforcement changed to PM QOS, this broke.
> > > > > > Previously
> > > > > > acpi_processor_get_platform_limit() was not enforcing any
> > > > > > limits.
> > > > > > It
> > > > > > was just setting variable. So any update done after
> > > > > > acpi_register_performance_state() call to pr->performance-
> > > > > > > states[ppc].core_frequency, was effective.
> > > > > > 
> > > > > > We don't really need to call
> > > > > >         ret = freq_qos_update_request(&pr->perflib_req,
> > > > > >                         pr->performance-
> > > > > > > states[ppc].core_frequency
> > > > > > *
> > > > > > 1000);
> > > > > > 
> > > > > > if the PPC is not changed. When PPC is changed, this gets
> > > > > > called
> > > > > > again,
> > > > > > so then we can call the above function to update cpufreq
> > > > > > limit.
> > > > > > 
> > > > > > The below change fixed for me.
> > > > > 
> > > > > Right.
> > > > I think, this is the only change you require to fix this. In
> > > > addition
> > > > set pr->performance_platform_limit = 0 in
> > > > acpi_processor_unregister_performance().
> > > 
> > > Not really, because if the limit is set to a lower frequency and
> > > then
> > > reset to _PSS[0], it needs to be set back to "no limit".
> > > 
> > 
> > If PPC becomes 0 again after ppc > 0 during dynamic PPC change, pr-
> > > performance_platform_limit will not match current PPC, so will
> > > set to
> > PPC 0 performance ( which is already patched by driver after return
> > from acpi_register_performance_state()).
> 
> I see.
> 
> > But fine, you can always set freq qos to FREQ_QOS_MAX_DEFAULT_VALUE
> > for
> > PPC 0 as you are doing in your patch.
> 
> I think that using the "no limit" value to represent the "no limit"
> condition makes sense.
Agree.

> 
> Also, I'm wondering if the patching of states[0].core_frequency will
> still be necessary after this change.

I don't think so. We can remove the patching.


  reply	other threads:[~2022-12-27 18:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 15:52 [PATCH 0/2] intel_pstate: fix turbo not being used after a processor is rebooted Pratyush Yadav
2022-12-21 15:52 ` [PATCH 1/2] acpi: processor: allow fixing up the frequency for a performance state Pratyush Yadav
2022-12-22 16:23   ` Rafael J. Wysocki
2022-12-22 22:18     ` Pratyush Yadav
2022-12-21 15:52 ` [PATCH 2/2] cpufreq: intel_pstate: use acpi perflib to update turbo frequency Pratyush Yadav
2022-12-21 21:34 ` [PATCH 0/2] intel_pstate: fix turbo not being used after a processor is rebooted srinivas pandruvada
2022-12-22 10:39   ` Pratyush Yadav
2022-12-23 18:10     ` srinivas pandruvada
2022-12-25  0:28       ` srinivas pandruvada
2022-12-27 15:38         ` Pratyush Yadav
2022-12-27 15:57           ` Rafael J. Wysocki
2022-12-27 16:40           ` srinivas pandruvada
2022-12-27 17:02             ` Rafael J. Wysocki
2022-12-27 17:13               ` Rafael J. Wysocki
2022-12-27 18:07               ` srinivas pandruvada
2022-12-27 18:47                 ` Rafael J. Wysocki
2022-12-27 18:49                   ` srinivas pandruvada [this message]
2022-12-27 18:54                     ` Rafael J. Wysocki
2022-12-27 16:15 ` 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=aad6d76a4a1bc986cb4187e041b9750d98196d80.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=devel@acpica.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ptyadav@amazon.de \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --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