All of lore.kernel.org
 help / color / mirror / Atom feed
From: Earl Chew <echew@ixiacom.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: Publishing mips_hpt_frequency in /proc/cpuinfo
Date: Fri, 28 Jan 2011 07:29:10 -0800	[thread overview]
Message-ID: <4D42E0C6.4060406@ixiacom.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1101281326000.31804@localhost6.localdomain6>

Ralf Baechle wrote:
> 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().

Thomas Gleixner wrote:
> Right. We had this discussion on x86 over and over and using a
> vsyscall is the correct approach. That's also a huge win in general if
> you can avoid going into the kernel to read the time. gettimeofday()
> and clock_gettime() belong to the most frequently called syscalls on
> any Linux system.

Ralf, Thomas,

Yes, I have seen that code on x86, and I completely agree with you both. The scenarios
that Ralf described pertinent, but for my currently application the win of
not going to the kernel that Thomas described is much more important.

I would very much like to go down the vsyscall route, but I can't see any
of that infrastructure in the arch/mips subdirectories.

It seems to me that that work has not been started for MIPS.  Am I mistaken ?

[ I'm trying to figure out where I should start. ]


Looking in /proc/cpuinfo for x86 I see:

> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 28
> model name      : Intel(R) Atom(TM) CPU D510   @ 1.66GHz
> stepping        : 10
> cpu MHz         : 1666.670

This makes available the clock frequency of the CPU. To get similar information
for MIPS, I need to rummage around inside dmesg:

> CPU revision is: 00019374 (MIPS 24Kc)
> Atheros AR7161 rev 2, CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz

Would you be averse to publishing additional CPU information (include cpu MHz)
in /proc/cpuinfo for MIPS ?


Earl

      reply	other threads:[~2011-01-28 15:29 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
2011-01-28 12:28   ` Thomas Gleixner
2011-01-28 15:29     ` Earl Chew [this message]

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=4D42E0C6.4060406@ixiacom.com \
    --to=echew@ixiacom.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.