lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iVMfz2joKiWK05FLpDyQTQj4RFAoE9Mc_RHbaUA1qRvw@mail.gmail.com>
Date:   Fri, 1 Oct 2021 21:04:35 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jens Axboe <axboe@...nel.dk>, pablomh@...il.com
Subject: Re: [PATCH] cpufreq: intel_pstate: Process HWP Guaranteed change notification

On Fri, Oct 1, 2021 at 9:01 PM Srinivas Pandruvada
<srinivas.pandruvada@...ux.intel.com> wrote:
>
> On Fri, 2021-10-01 at 20:52 +0200, Rafael J. Wysocki wrote:
> > On Tue, Sep 28, 2021 at 6:42 PM Srinivas Pandruvada
> > <srinivas.pandruvada@...ux.intel.com> wrote:
> > >
> > > It is possible that HWP guaranteed ratio is changed in response to
> > > change in power and thermal limits. For example when Intel Speed
> > > Select
> > > performance profile is changed or there is change in TDP, hardware
> > > can
> > > send notifications. It is possible that the guaranteed ratio is
> > > increased. This creates an issue when turbo is disabled, as the old
> > > limits set in MSR_HWP_REQUEST are still lower and hardware will
> > > clip
> > > to older limits.
> > >
> > > This change enables HWP interrupt and process HWP interrupts. When
> > > guaranteed is changed, calls cpufreq_update_policy() so that driver
> > > callbacks are called to update to new HWP limits. This callback
> > > is called from a delayed workqueue of 10ms to avoid frequent
> > > updates.
> > >
> > > Although the scope of IA32_HWP_INTERRUPT is per logical cpu, on
> > > some
> > > plaforms interrupt is generated on all CPUs. This is particularly a
> > > problem during initialization, when the driver didn't allocated
> > > data for other CPUs. So this change uses a cpumask of enabled CPUs
> > > and
> > > process interrupts on those CPUs only.
> > >
> > > When the cpufreq offline() or suspend()callback is called, HWP
> > > interrupt
> > > is disabled on those CPUs and also cancels any pending work item.
> > >
> > > Spin lock is used to protect data and processing shared with
> > > interrupt
> > > handler. Here READ_ONCE(), WRITE_ONCE() macros are used to
> > > designate
> > > shared data, even though spin lock act as an optmization barrier
> > > here.
> > >
> > > Signed-off-by: Srinivas Pandruvada <
> > > srinivas.pandruvada@...ux.intel.com>
> > > ---
> > > This patch is a replacement from the patch submitted to 5.15 and
> > > later
> > > reverted.
> >
> > Applied as 5.16 material, thanks!
> I got email that pablo (pablomh@...il.com) tested this. So he can added
> Tested-by also pointed out typo in "optmization".
> Shall I send a patch with this change?

No need, I will update the commit in the tree.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ