public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	 Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	david.e.box@intel.com,  platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	 linux-pm@vger.kernel.org, rjw@rjwysocki.net
Subject: Re: [PATCH] platform/x86/intel/pmc: Disable C1 auto-demotion during suspend
Date: Thu, 3 Oct 2024 14:14:47 +0300 (EEST)	[thread overview]
Message-ID: <856e2489-d92a-4203-feae-b4f41af8ed04@linux.intel.com> (raw)
In-Reply-To: <f621da34-32a7-c56e-2c99-54a5f03c7e6f@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

On Wed, 2 Oct 2024, Ilpo Järvinen wrote:

> On Tue, 1 Oct 2024, David E. Box wrote:
> 
> > On some platforms, aggressive C1 auto-demotion may lead to failure to enter
> > the deepest C-state during suspend-to-idle, causing high power consumption.
> > To prevent this, disable C1 auto-demotion during suspend and re-enable on
> > resume.
> > 
> > Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> > ---

> > @@ -220,6 +237,15 @@ int cnl_resume(struct pmc_dev *pmcdev)
> >  {
> >  	pmc_core_send_ltr_ignore(pmcdev, 3, 0);
> >  
> > +	if (!pm_suspend_via_firmware()) {
> > +		int cpunum;
> > +
> > +		for_each_online_cpu(cpunum) {
> > +			pr_debug("%s: cpu:%d cst %llx\n", __func__, cpunum, per_cpu(pkg_cst_config, cpunum));
> > +			wrmsrl_on_cpu(cpunum, MSR_PKG_CST_CONFIG_CONTROL, per_cpu(pkg_cst_config, cpunum));
> 
> Is the set of onlined CPUs iterated by the suspend and resume handlers 
> guaranteed to be the same?

I asked about this from more knowledgeable people than me and got a 
response that during suspend/resume userspace cannot offline any CPUs so 
it should be guaranteed to remain the same for resume.

-- 
 i.

      reply	other threads:[~2024-10-03 11:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-01 22:58 [PATCH] platform/x86/intel/pmc: Disable C1 auto-demotion during suspend David E. Box
2024-10-02  3:11 ` Mario Limonciello
2024-10-02  3:51   ` David E. Box
2024-10-02  8:52 ` Ilpo Järvinen
2024-10-03 11:14   ` Ilpo Järvinen [this message]

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=856e2489-d92a-4203-feae-b4f41af8ed04@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.e.box@intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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