From: Liran Alon <liran.alon@oracle.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: linux-pm@vger.kernel.org, lenb@kernel.org, rjw@rjwysocki.net,
viresh.kumar@linaro.org,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH 1/2] x86: intel_pstate: Fix wrong definition of Disable Energy Efficiency Optimization bit
Date: Mon, 15 Apr 2019 21:27:29 +0300 [thread overview]
Message-ID: <B1F73CF7-B984-4EE2-A331-46BEE95D3FE5@oracle.com> (raw)
In-Reply-To: <4205cd7a8b94a6000625b34d51bd6f960af8666f.camel@linux.intel.com>
> On 15 Apr 2019, at 21:22, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> wrote:
>
> On Mon, 2019-04-15 at 21:13 +0300, Liran Alon wrote:
>>> On 15 Apr 2019, at 21:03, Srinivas Pandruvada <
>>> srinivas.pandruvada@linux.intel.com> wrote:
>>>
>>> On Mon, 2019-04-15 at 11:32 +0300, Liran Alon wrote:
>>>>> On 15 Apr 2019, at 5:00, Srinivas Pandruvada <
>>>>> srinivas.pandruvada@linux.intel.com> wrote:
>>>>>
>>>>> On Sun, 2019-04-14 at 23:48 +0300, Liran Alon wrote:
>>>>>> Bit definition can be found in Intel SDM Section 2.16 MSRS IN
>>>>>> THE
>>>>>> 6TH
>>>>>> GENERATION, 7TH GENERATION AND 8TH GENERATION
>>>>>> INTEL® CORE™ PROCESSORS, INTEL® XEON® PROCESSOR SCALABLE
>>>>>> FAMILY, AND FUTURE INTEL® CORE™ PROCESSORS.
>>>>>>
>>>>>> Definition of all Skylake MSR_POWER_CTL bits can also be
>>>>>> found at
>>>>>> EDK2
>>>>>> source at UefiCpuPkg/Include/Register/Msr/SkylakeMsr.h union
>>>>>> MSR_SKYLAKE_POWER_CTL_REGISTER.
>>>>>>
>>>>>> Fixes: 6e978b22efa1 ("cpufreq: intel_pstate: Disable energy
>>>>>> efficiency optimization")
>>>>>
>>>>> What are you trying to address? This bit 19 has a special
>>>>> meaning
>>>>> when
>>>>> system is in HWP mode. So this is correct.
>>>>>
>>>>> Bit 20 has a different meaning depending on legacy or in HWP
>>>>> mode.
>>>>>
>>>>> Thanks,
>>>>> Srinivas
>>>>>
>>>>
>>>> Maybe I’m misinterpreting Intel SDM, but it seems to me that bit
>>>> 19
>>>> in MSR_POWER_CTL is always "Disable Race to Halt Optimization
>>>> (R/W)”
>>>> while bit 20 is the "Disable Energy Efficiency Optimization
>>>> (R/W)”.
>>>>
>>>> I didn’t find a place in Intel SDM where it is discussed that bit
>>>> 19
>>>> have a special meaning when system is in HWP mode.
>>>> Can you point me to relevant place in Intel SDM?
>>>>
>>>
>>> SDM doesn't describe the algorithms. This is a feature of Intel
>>> Speed
>>> Shift Technology aka HWP. Both bits target disabling some energy
>>> efficiency features of the processor. I wish there are some better
>>> names of these bits. Ideas is to pick the best for a platform based
>>> on
>>> the performance needs. Here based on the experiments, setting bit
>>> 19
>>> gave the required performance on Kaby Lake desktops.
>>>
>>> So unless you found some performance/power issue with setting of
>>> bit 19
>>> vs bit 20, on Kaby Lake based platforms, we shouldn't change (may
>>> be
>>> rename as per SDM definition).
>>>
>>> Thanks,
>>> Srinivas
>>
>> I haven’t found any performance/power issue.
>>
>> The name of the bit, the function names, prints and comments just
>> seems to refer to bit 20 and not bit 19.
>> If the code intention is to manipulate "Disable Race to Halt
>> Optimization” bit instead of "Disable Energy Efficiency Optimization”
>> bit,
>> code should be renamed appropriately.
>> Is this code intention?
> The code change was done before SDM documented this feature, so it is
> not matching.
>
> Thanks,
> Srinivas
>
So should I submit a v2 patch that renames these appropriately by updated SDM?
-Liran
next prev parent reply other threads:[~2019-04-15 18:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-14 20:48 [PATCH 1/2] x86: intel_pstate: Fix wrong definition of Disable Energy Efficiency Optimization bit Liran Alon
2019-04-14 20:48 ` [PATCH 2/2] x86: intel: Define MSR_POWER_CTL bits with symbolic constants Liran Alon
2019-04-15 2:10 ` Srinivas Pandruvada
2019-04-15 8:35 ` Liran Alon
2019-04-15 2:00 ` [PATCH 1/2] x86: intel_pstate: Fix wrong definition of Disable Energy Efficiency Optimization bit Srinivas Pandruvada
2019-04-15 8:32 ` Liran Alon
2019-04-15 18:03 ` Srinivas Pandruvada
2019-04-15 18:13 ` Liran Alon
2019-04-15 18:22 ` Srinivas Pandruvada
2019-04-15 18:27 ` Liran Alon [this message]
2019-04-15 18:30 ` Srinivas Pandruvada
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=B1F73CF7-B984-4EE2-A331-46BEE95D3FE5@oracle.com \
--to=liran.alon@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.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