The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Zhang Rui <rui.zhang@intel.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH v1] cpufreq: intel_pstate: Make it possible to avoid enabling CAS
Date: Sun, 09 Feb 2025 19:14:14 -0800	[thread overview]
Message-ID: <73fa23f76f5de138307ec9733bab14408baee78c.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0jytAtj_rDSz52OznCNV5Wo3hb0bjXCUR+ox99YdSxJ_Q@mail.gmail.com>

On Fri, 2025-02-07 at 13:55 +0100, Rafael J. Wysocki wrote:
> On Mon, Jan 27, 2025 at 3:07 PM Rafael J. Wysocki <rjw@rjwysocki.net>
> wrote:
> > 
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > Capacity-aware scheduling (CAS) is enabled by default by
> > intel_pstate on
> > hybrid systems without SMT, but in some usage scenarios it may be
> > more
> > attractive to place tasks for maximum CPU performance regardless of
> > the
> > extra cost in terms of energy, which is the case on such systems
> > when
> > CAS is not enabled, so introduce a command line option to forbid
> > intel_pstate to enable CAS.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Srinivas,
> 
> Any concerns or comments?
> 

No.

    Acked-by:Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> > ---
> >  Documentation/admin-guide/kernel-parameters.txt |    3 +++
> >  Documentation/admin-guide/pm/intel_pstate.rst   |    3 +++
> >  drivers/cpufreq/intel_pstate.c                  |    9 +++++++++
> >  3 files changed, 15 insertions(+)
> > 
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -2295,6 +2295,9 @@
> >                         per_cpu_perf_limits
> >                           Allow per-logical-CPU P-State performance
> > control limits using
> >                           cpufreq sysfs interface
> > +                       no_cas
> > +                         Do not enable capacity-aware scheduling
> > (CAS) on
> > +                         hybrid systems
> > 
> >         intremap=       [X86-64,Intel-IOMMU,EARLY]
> >                         on      enable Interrupt Remapping
> > (default)
> > --- a/Documentation/admin-guide/pm/intel_pstate.rst
> > +++ b/Documentation/admin-guide/pm/intel_pstate.rst
> > @@ -696,6 +696,9 @@
> >         Use per-logical-CPU P-State limits (see `Coordination of P-
> > state
> >         Limits`_ for details).
> > 
> > +``no_cas``
> > +       Do not enable capacity-aware scheduling (CAS) which is
> > enabled by
> > +       default on hybrid systems.
> > 
> >  Diagnostics and Tuning
> >  ======================
> > --- a/drivers/cpufreq/intel_pstate.c
> > +++ b/drivers/cpufreq/intel_pstate.c
> > @@ -936,6 +936,8 @@
> >         NULL,
> >  };
> > 
> > +static bool no_cas __ro_after_init;
> > +
> >  static struct cpudata *hybrid_max_perf_cpu __read_mostly;
> >  /*
> >   * Protects hybrid_max_perf_cpu, the capacity_perf fields in
> > struct cpudata,
> > @@ -1041,6 +1043,10 @@
> > 
> >  static void hybrid_init_cpu_capacity_scaling(bool refresh)
> >  {
> > +       /* Bail out if enabling capacity-aware scheduling is
> > prohibited. */
> > +       if (no_cas)
> > +               return;
> > +
> >         /*
> >          * If hybrid_max_perf_cpu is set at this point, the hybrid
> > CPU capacity
> >          * scaling has been enabled already and the driver is just
> > changing the
> > @@ -3835,6 +3841,9 @@
> >         if (!strcmp(str, "no_hwp"))
> >                 no_hwp = 1;
> > 
> > +       if (!strcmp(str, "no_cas"))
> > +               no_cas = true;
> > +
> >         if (!strcmp(str, "force"))
> >                 force_load = 1;
> >         if (!strcmp(str, "hwp_only"))
> > 
> > 
> > 
> > 
> 


      reply	other threads:[~2025-02-10  3:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 13:07 [PATCH v1] cpufreq: intel_pstate: Make it possible to avoid enabling CAS Rafael J. Wysocki
2025-02-07 12:55 ` Rafael J. Wysocki
2025-02-10  3:14   ` srinivas pandruvada [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=73fa23f76f5de138307ec9733bab14408baee78c.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    /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