mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>, X86 ML <x86@kernel.org>,
	Borislav Petkov <bp@alien8.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH] x86: Add a turbo mode sysctl
Date: Sun, 3 Apr 2016 11:55:34 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1604031151040.3978@nanos> (raw)
In-Reply-To: <CALCETrUfy-yZ6FD7J3AwhP7KB5eZ+YRMrKS_CyNDLvJwmiC49g@mail.gmail.com>

On Sat, 2 Apr 2016, Andy Lutomirski wrote:
> On Fri, Apr 1, 2016 at 9:10 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> >> +     if (turbo_mode)
> >> +             write_cr0(cr0 & ~X86_CR0_CD);
> >> +     else
> >> +             write_cr0(cr0 | X86_CR0_CD);
> >
> > I think proper turbo mode disable requires ~(X86_CR0_CD | X86_CR0_NW)
> 
> I thought that made no difference on family 6 and P4 and was actively
> dangerous (disabled coherency) before.  At least, that's what the
> table of caching modes and the footnote seems to say.

CD=0 and NW=1 result in #GP, which might be your intent as that is definitely
the slowest mode you can achieve. But you should add a comment at least.

> I think we should merge this patch and add a special-case so that
> calling unlink on turbo_mode sets it to zero.  Then people who rm -rf
> / will brick their systems more slowly :)

While at it can you please make a turbo = 0 call when we hit a WARN/BUG/Panic
so the messages spill slower over the screen?

Thanks,

	tglx

  reply	other threads:[~2016-04-03  9:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 15:49 Andy Lutomirski
2016-04-01 16:05 ` Borislav Petkov
2016-04-01 16:07 ` kbuild test robot
2016-04-01 16:10 ` Thomas Gleixner
2016-04-02 20:21   ` Andy Lutomirski
2016-04-03  9:55     ` Thomas Gleixner [this message]
2016-04-03 10:12       ` Borislav Petkov
2016-04-04  6:48 ` Nikolay Borisov

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=alpine.DEB.2.11.1604031151040.3978@nanos \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.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

all inboxes | Powered by JetHome®