[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0809230847360.3265@nehalem.linux-foundation.org>
Date: Tue, 23 Sep 2008 09:01:28 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Masami Hiramatsu <mhiramat@...hat.com>
cc: Mathieu Desnoyers <compudj@...stal.dyndns.org>,
Martin Bligh <mbligh@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>, darren@...art.com,
"Frank Ch. Eigler" <fche@...hat.com>,
systemtap-ml <systemtap@...rces.redhat.com>
Subject: Re: Unified tracing buffer
On Tue, 23 Sep 2008, Masami Hiramatsu wrote:
>
> 2.00GHz is the maximum(model) frequency. And 'cpu MHz' means
> current frequency. (yep, now I'm using cpufreq)
> Anyway, when I measured TSC drift, I killed cpuspeed service and
> fixed freq to 2000. ;-)
Ahh. I have an idea..
Maybe that thing does thermal throttling?
Fixing the frequency at the highest setting is actually one of the worst
things you can do, because if the device is thermally limited, it will
still do the whole throttling thing, but now it won't do it by changing
the frequency any more, it will do it by essentially forxing the external
frequency down.
And that is going to be *very* inefficient. You really really don't want
that. Your performance will actually be _worse_ than if the CPU went to a
lower frequency. And it might explain the unreliable TSC too, because I
suspect constant TSC is really constant only wrt the bus clock to the CPU.
The termal throttling thing is a "protect the CPU from overheating" last
ditch effort, and because it doesn't lower voltage, it isn't actually at
all as efficient at saving power (and thus cooling the CPU) as a real
frequency change event would be.
And fixing the frequency to the highest frequency in a tight laptop
enclosure is the best way to force that behavior (in contrast - in a
desktop system with sufficient cooling, it's usually not a problem at all
to just say "run at highest frequency").
And btw, that also explains why you had so *big* changes in frequency: the
throttling I think happens with a 1/8 duty cycle thing, iirc.
It's supposed to be very rare with Core 2. Thermal throttling was quite
common with the P4 one, and was the main overheating protection initially.
These days, you should only see it for really badly designed devices that
simply don't have enough thermal cooling, but if the design calls for
mostly running at low frequency because it's some thing-and-light notebook
with insufficient cooling (or some thick-and-heavy thing that is just
total crap), and you force it to always run at full speed, I can imagine
it kicking in to protect the CPU.
It's obviously also going to be much easier to see if the ambient
temperature is high. If you want to get best peformance, take one of those
compressed-air spray-cans, and spray on the laptop with the can held
upside down (the can will generally tell you _not_ to do that, because
then you'll get the liquid itself rather than gas, but that's what you
want for cooling).
So if you can test this, try it with
(a) cpufreq at a fixed _low_ value (to not cause overheating)
(b) with the spray-can cooling the thing and cpufreq at a fixed high
value
and see if the TSC is constant then.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists