From: Ralf Baechle <ralf@linux-mips.org>
To: Earl Chew <echew@ixiacom.com>
Cc: linux-mips@linux-mips.org, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Publishing mips_hpt_frequency in /proc/cpuinfo
Date: Fri, 28 Jan 2011 11:57:20 +0100 [thread overview]
Message-ID: <20110128105720.GA28544@linux-mips.org> (raw)
In-Reply-To: <4D424D4B.5090002@ixiacom.com>
On Thu, Jan 27, 2011 at 08:59:55PM -0800, Earl Chew wrote:
> The CPU frequency is known to the Linux kernel. For example:
>
> > CPU revision is: 00019374 (MIPS 24Kc)
> > Atheros AR7161 rev 2, CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz
> > ...
> > Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
>
> Unfortunately that information is not available from userspace:
>
> > cpu model : MIPS 24Kc V7.4
> > BogoMIPS : 452.19
>
> This makes it difficult to use CPU timers (rdhwr) from user space
> applications.
>
>
> Is there any reason not to publish mips_hpt_frequency in /proc/cpuinfo ?
The CPU clock frequency may change at any time due to clockscaling A
process might be rescheduled to another CPU running at a different clock
rate. A suspended process might miss counter wraparounds.
This right approach is to handle this in a virtual syscall, something like
vsys_clock_gettime().
Ralf
next prev parent reply other threads:[~2011-01-28 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 4:59 Publishing mips_hpt_frequency in /proc/cpuinfo Earl Chew
2011-01-28 4:59 ` Earl Chew
2011-01-28 10:57 ` Ralf Baechle [this message]
2011-01-28 12:28 ` Thomas Gleixner
2011-01-28 15:29 ` Earl Chew
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=20110128105720.GA28544@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=echew@ixiacom.com \
--cc=linux-mips@linux-mips.org \
--cc=tglx@linutronix.de \
/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