[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1604031151040.3978@nanos>
Date: Sun, 3 Apr 2016 11:55:34 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Andy Lutomirski <luto@...capital.net>
cc: Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
Borislav Petkov <bp@...en8.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux API <linux-api@...r.kernel.org>
Subject: Re: [PATCH] x86: Add a turbo mode sysctl
On Sat, 2 Apr 2016, Andy Lutomirski wrote:
> On Fri, Apr 1, 2016 at 9:10 AM, Thomas Gleixner <tglx@...utronix.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
Powered by blists - more mailing lists