public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: lenb@kernel.org, Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH] Do not modify MSR_IA32_ENERGY_PERF_BIAS in kernel
Date: Fri, 04 Mar 2016 09:37:15 +0100	[thread overview]
Message-ID: <1770444.1VxdmEr8lv@skinner> (raw)
In-Reply-To: <11753995.6ynq8tUiQx@vostro.rjw.lan>

On Wednesday, March 02, 2016 01:26:18 AM Rafael J. Wysocki wrote:
> On Tuesday, March 01, 2016 01:17:37 PM Thomas Renninger wrote:
> > > >  	if (!cpu_has(c, X86_FEATURE_EPB))z
> > > >  	
> > > >  		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.
> > 
> > You mean why switch the message from:
> > x86_energy_perf_policy to cpupower-set
> > ?
> > 
> > IMO x86_energy_perf_policy should not exist. It has been introduce before
> > cpupower set -b.
> > Having an extra tool/binary for this functionality is an unneeded
> > packaging
> > overhead for distros.
> > Also having more and more of such CPU specific tools is not userfriendly.
> > cpupower supports all power relevant features of your CPU and on all
> > architectures (or at least it should). People should know this one better
> > than "x86_energy_perf_policy" and theoretically intuitively find it, even
> > without a message.
> > 
> > So it would be nice to get the message fixed as well.
> 
> My point is that since "cpupower set -b" is not the only way to set this,
> it doesn't seem appropriate to refer to it explicitly from a kernel message.
> 
> I actually don't think the second message is necessary at all.

Hmm, thinking a bit more about this, I think the whole 
init_intel_energy_perf() function check should vanish.

The check should get moved into the powertop userspace tool.
This one is used to optimize platform for power saving features.

This would also keep the kernel core code clean...

If you agree I will send the patch.

      Thomas

  reply	other threads:[~2016-03-04  8:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 16:38 [PATCH] Do not modify MSR_IA32_ENERGY_PERF_BIAS in kernel Thomas Renninger
2016-02-26 16:42 ` Thomas Renninger
2016-02-26 23:15 ` Rafael J. Wysocki
2016-03-01 12:17   ` Thomas Renninger
2016-03-02  0:26     ` Rafael J. Wysocki
2016-03-04  8:37       ` Thomas Renninger [this message]
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=1770444.1VxdmEr8lv@skinner \
    --to=trenn@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rjw@rjwysocki.net \
    --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