mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Thomas Renninger <trenn@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	lenb@kernel.org, Thomas Renninger <trenn@suse.com>,
	x86@kernel.org
Subject: Re: [PATCH] Do not modify MSR_IA32_ENERGY_PERF_BIAS in kernel
Date: Sat, 27 Feb 2016 00:15:47 +0100	[thread overview]
Message-ID: <4735967.8N5ugyHAG2@vostro.rjw.lan> (raw)
In-Reply-To: <4687430.mfM0GbdeDL@skinner>

On Friday, February 26, 2016 05:38:00 PM Thomas Renninger wrote:
> The assumption that BIOSes never want to have this register being set to
> full performance (zero) is wrong.
> 
> While wrongly overruling this BIOS setting and set it from performance
> to normal did not hurt that much, because nobody really knew the effects inside
> Intel processors.
> 
> But with Broadwell-EP processor (E5-2687W v4) the CPU will not enter turbo modes
> if this value is not set to performance.
> 
> So switch logic to tell the user in a friendly way (info) that the CPU is in
> performance mode and how to switch via userspace if this is not intended.
> 
> But otherwise trust that the BIOS has set the correct value here and do not
> blindly overrule.
> 
> How this has been found: SLE11 had this patch, SLE12 it slipped through.
> It took quite some time to nail down that this patch missing is the reason
> for not entering turbo modes with this specific processor.
> 
> Signed-off-by: Thomas Renninger <trenn@suse.com>
> 
> --- a/arch/x86/kernel/cpu/intel.c	2016-02-26 17:19:55.731042972 +0100
> +++ b/arch/x86/kernel/cpu/intel.c	2016-02-26 17:20:48.598020581 +0100
> @@ -377,8 +377,12 @@ static void init_intel_energy_perf(struc
>  	u64 epb;
>  
>  	/*
> -	 * Initialize MSR_IA32_ENERGY_PERF_BIAS if not already initialized.
> -	 * (x86_energy_perf_policy(8) is available to change it at run-time.)
> +	 * On server platforms energy bias typically is set to
> +	 * performance on purpose.
> +	 * On other platforms it may happen that MSR_IA32_ENERGY_PERF_BIAS
> +	 * did not get initialized properly by BIOS.
> +	 * Best is to to keep BIOS settings and give the user a hint whether
> +	 * to change it via cpupower-set(8) userspace tool at runtime.
>  	 */
>  	if (!cpu_has(c, X86_FEATURE_EPB))
>  		return;
> @@ -387,10 +391,8 @@ static void init_intel_energy_perf(struc
>  	if ((epb & 0xF) != ENERGY_PERF_BIAS_PERFORMANCE)
>  		return;
>  
> -	pr_warn_once("ENERGY_PERF_BIAS: Set to 'normal', was 'performance'\n");
> -	pr_warn_once("ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)\n");
> -	epb = (epb & ~0xF) | ENERGY_PERF_BIAS_NORMAL;
> -	wrmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb);
> +	pr_info_once("ENERGY_PERF_BIAS is set to 'performance'\n");
> +	pr_info_once("ENERGY_PERF_BIAS: Update with cpupower-set(8)\n");

This doesn't need to be cpupower-set IMO.

>  }
>  
>  static void intel_bsp_resume(struct cpuinfo_x86 *c)
> 

Thanks,
Rafael

  parent reply	other threads:[~2016-02-26 23:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 16:38 Thomas Renninger
2016-02-26 16:42 ` Thomas Renninger
2016-02-26 23:15 ` Rafael J. Wysocki [this message]
2016-03-01 12:17   ` Thomas Renninger
2016-03-02  0:26     ` Rafael J. Wysocki
2016-03-04  8:37       ` Thomas Renninger
2016-03-04 12:56         ` Rafael J. Wysocki
2016-03-07 13:24           ` [PATCH] Do not modify perf bias performance setting by default at boot Thomas Renninger
2016-03-07 16:17             ` Thomas Renninger
2016-03-08  0:50           ` [PATCH] Do not modify MSR_IA32_ENERGY_PERF_BIAS in kernel Len Brown
2016-03-08 12:14             ` Thomas Renninger
2016-03-08 21:07               ` Len Brown

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=4735967.8N5ugyHAG2@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=trenn@suse.com \
    --cc=trenn@suse.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®