From: Mikael Pettersson <mikpe@csd.uu.se>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][2.6.7-mm1] perfctr ppc32 update
Date: Wed, 23 Jun 2004 00:18:46 +0200 [thread overview]
Message-ID: <16600.45126.425726.174463@alkaid.it.uu.se> (raw)
In-Reply-To: <1087939194.1839.13.camel@gaston>
Benjamin Herrenschmidt writes:
>
> > So what you're saying is that PLL_CFG may not reflect the true
> > relationship between the TB frequency and the core frequency?
>
> Right.
>
> > That shouldn't be a problem as long as there's _some_ in-kernel
> > interface for finding that out. If querying OF isn't the correct
> > approach, then what is?
>
> What do you need exactly ? The TB one or the core one ? the core
> I suppose ? Well, we should probably define an ppc_get_cpu_core_frequency
> or something like that that uses the cpufreq callback like the pmac code
> when cpufreq is enabled or default to the old parsing when not. Look at
> the pmac code. You may also want to install a cpufreq notifier callback
> to be informed of core frequency changes.
I want both TB and core speeds, but TB is more important.
Originally, I used and sampled the x86 time-stamp counter to
provide an additional clock-like register for measurements.
On x86, observable TSC freq == core freq, so the CPU speed
I report to users coincides with TSC speed. This is then
used to derive high-resolution actual time from TSC counts.
When adding PPC32 support, I used TB for the clock-like
entity, but had to introduce a TB-to-core multiplier to
maintain the notion that clock*multiplier == core speed.
If TB speed is constant but core speed is not, then this
was a mistake and I should instead report TB speed only,
and let user-space convert TB counts to time directly
without conversion via core speed.
So can I assume constant TB speed? In that case I don't
really care about core speed changes.
/Mikael
next prev parent reply other threads:[~2004-06-22 22:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-21 20:14 Mikael Pettersson
2004-06-22 18:17 ` Benjamin Herrenschmidt
2004-06-22 20:09 ` Mikael Pettersson
2004-06-22 20:21 ` Benjamin Herrenschmidt
2004-06-22 20:40 ` Mikael Pettersson
2004-06-22 21:19 ` Benjamin Herrenschmidt
2004-06-22 22:18 ` Mikael Pettersson [this message]
2004-06-22 22:14 ` Benjamin Herrenschmidt
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=16600.45126.425726.174463@alkaid.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.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®