linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sultan Alsawaf <sultan@kerneltoast.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	kitsunyan <kitsunyan@airmail.cc>,
	"Brown, Len" <len.brown@intel.com>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] x86/msr: do not warn on writes to OC_MAILBOX
Date: Tue, 8 Sep 2020 12:18:38 -0700	[thread overview]
Message-ID: <20200908191838.GA2014@sultan-box.localdomain> (raw)
In-Reply-To: <20200908180112.GK25236@zn.tnic>

On Tue, Sep 08, 2020 at 08:01:12PM +0200, Borislav Petkov wrote:
> On Tue, Sep 08, 2020 at 07:42:12PM +0200, Jason A. Donenfeld wrote:
> > Are you prepared to track down all the MSRs that might maybe do
> > something naughty?
> 
> I'm not prepared - that's why this MSR filtering. To block *all* direct
> MSR accesses from userspace in the future.
> 
> > Does `dd` warn when you run `dd if=/dev/zero of=/dev/sda`?
> 
> Yah, because that's the same as bricking your hardware. Geez.
> 
> > Probably not possible. Optimal values are related to the "silicon
> > lottery" that occurs when you buy a new CPU. Different optimal values
> > for different individual chips.
> 
> Let's wait for what Srinivas finds out. I'd let Intel decide what they
> wanna do.
> 
> -- 
> Regards/Gruss,
>     Boris.
> 
> https://people.kernel.org/tglx/notes-about-netiquette

I'd like to point out that on Intel's recent 14nm parts, undervolting is not so
much for squeezing every last drop of performance out of the SoC as it is for
necessity.

I have an i9-9880H laptop which, at 4000 MHz on all CPUs while compiling a
kernel, uses 107W with the stock configuration. Upon undervolting, this figure
goes down to 88W, a ~22% reduction in power consumption at the maximum pstate.
The point of this is not primarily to reduce the power footprint of my machine,
but to get the thermals of this CPU under control. Without undervolting, my
i9-9880H is quite useless, and quickly reaches 100 degC with the fans at max
speed when placed under load.

The 22% reduction in power consumption also makes it clear that these parts use
very heavy-handed voltages out-of-the-box. I consider this to be a defect in the
part; I've never encountered any other CPUs that run, by default, at a voltage
so high that I could achieve a 22% reduction in power consumption by
undervolting.

I've tested multiple 14nm Intel CPUs, 8th gen and above, and they all exhibit
this behavior. On my i5-8265U laptop, compiling a kernel causes the CPU to hit
its 35W power limit and run at about 3300 MHz instead of its maximum all-core
frequency of 3700 MHz. After undervolting, when compiling a kernel, my i5-8265U
runs at 3700 MHz and uses 27W; not only was power consumption reduced by ~30%,
but also performance was improved. Not to mention, my i5-8265U laptop's thermal
design cannot dissipate 35W for very long, but it can sustain 27W without
reaching 100 degC quite well.

If Intel's recent 14nm CPUs didn't guzzle power, then we would have no need to
undervolt. But they do, and here we are.

Sultan

  parent reply	other threads:[~2020-09-08 19:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  9:48 [PATCH] x86/msr: do not warn on writes to OC_MAILBOX Jason A. Donenfeld
2020-09-07 10:06 ` Borislav Petkov
2020-09-07 10:46   ` Jason A. Donenfeld
2020-09-07 11:11     ` Borislav Petkov
2020-09-07 11:15       ` Jason A. Donenfeld
2020-09-07 11:23         ` Borislav Petkov
2020-09-08 17:10   ` Srinivas Pandruvada
2020-09-08 17:12     ` Jason A. Donenfeld
2020-09-08 17:25       ` Borislav Petkov
2020-09-08 17:29         ` Jason A. Donenfeld
2020-09-08 17:36           ` Borislav Petkov
2020-09-08 17:42             ` Jason A. Donenfeld
2020-09-08 18:01               ` Borislav Petkov
2020-09-08 19:07                 ` Jason A. Donenfeld
2020-09-08 19:18                 ` Sultan Alsawaf [this message]
2020-09-08 19:30                   ` Borislav Petkov
2020-09-08 20:35                     ` Andy Lutomirski
2020-09-08 22:32                       ` Matthew Garrett
2020-09-09 23:56                         ` Andy Lutomirski
2020-09-09  1:02                     ` Srinivas Pandruvada
2020-09-10  0:08                       ` Andy Lutomirski
2020-10-19 17:15                       ` Borislav Petkov
2020-10-20 17:21                         ` Srinivas Pandruvada
2020-10-20 17:47                           ` Borislav Petkov
2020-10-20 18:40                             ` Srinivas Pandruvada
2020-10-20 19:40                               ` Dave Hansen
2020-10-21 13:11                                 ` Srinivas Pandruvada
2020-10-22 19:28                                   ` Borislav Petkov
2020-10-21 13:24                           ` Peter Zijlstra
2020-09-08 17:31     ` Borislav Petkov

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=20200908191838.GA2014@sultan-box.localdomain \
    --to=sultan@kerneltoast.com \
    --cc=Jason@zx2c4.com \
    --cc=bp@alien8.de \
    --cc=kitsunyan@airmail.cc \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=torvalds@linux-foundation.org \
    --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;
as well as URLs for NNTP newsgroup(s).