On Thursday 14 April 2011 06:49 am, Dimitry Andric wrote:
> On 2011-04-14 00:27, Jung-uk Kim wrote:
> ...
>
> >> will still read 0 from MSR_MPERF, leading to a division by zero.
> >> Maybe just fallback to the second method in the 'else' branch
> >> then?
> >
> > That means your VM has broken CPUID support.  To get there, it
> > has to meet two conditions, i.e., TSC is invariant and it has
> > APERF/MPERF MSRs.
>
> Well, VM hosts like VMware and VirtualBox usually just return the
> 'native' CPUID values to guests, but can't really support stuff
> like those MSRs, for all kinds of reasons.
>
> I was just looking at this from a viewpoint of "it worked for
> years, and now it broke". :)
>
> In any case, I don't see why a bit of defensive programming would
> be bad here, so I propose the following patch to revert to the
> 'old' way of estimating the rate, in case reading the MPERF MSR
> returns zero.

I am going to test APERF & MPERF so that you don't need to do that 
from there.  Please stay tuned.

Jung-uk Kim
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to