Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-16 Thread Peter Wemm

Sergey Babkin wrote:
> Terry Lambert wrote:
> > 
> > It got really bogged down when someone pointed out that
> > they were running CPUs with different clock rates in their
> > SMP box, just to see what the net effect would be.  THe
> 
> As far as I understand, you just physically can't do it: 
> the P-II CPU initialization depends on all the CPUs on the
> bus running at the same rate. Or if you can do it then you still
> should never do it. Unless you actually have a NUMA machine
> (as opposed to an SMP machine).

Nope, you most certainly can do this, I have such a box.  One cpu is
running at 866MHz, the other at 933MHz.  The front-side-bus is the same
speed though (133MHz), just the internal clock multiplier within the cpu is
different.

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-16 Thread Sergey Babkin

Terry Lambert wrote:
> 
> It got really bogged down when someone pointed out that
> they were running CPUs with different clock rates in their
> SMP box, just to see what the net effect would be.  THe

As far as I understand, you just physically can't do it: 
the P-II CPU initialization depends on all the CPUs on the
bus running at the same rate. Or if you can do it then you still
should never do it. Unless you actually have a NUMA machine
(as opposed to an SMP machine).

-SB

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Josh Paetzel

On Fri, Mar 15, 2002 at 10:27:22AM -0800, Terry Lambert wrote:
> Josh Paetzel wrote:
> > This is a perfect example of, "Just because you can do something,
> > doesn't mean you should."
> > 
> > I wouldn't see anything wrong with grabbing the clock frequency of the
> > first cpu in the system and noting in the man page that if you have
> > multiple cpus and you aren't running them at the same frequency, then
> > the reported value is applicable only to the first cpu.
> > 
> > This would save a ton of time in implementing Jordan's ideas, at the
> > cost of not being able to deal correctlywith a situation that
> > (hopefully) isn't too common in the field.  The other less tangible
> >  disadvantage to my suggestion is that it takes us one step further in our
> > single-cpu-centric userland, ala top, uptime, and so forth only
> > displaying stats for "one" cpu.
> 
> Incorrect information is always worse than no information.
> 
> -- Terry

Yeah, you're right.  Six hours of contemplation and I've changed my 
tune.  If it's going to be done, should be done right. 

Josh



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Matthew Dillon

:Doug White wrote:
:> I've been asked several times about how to get CPU speed information for
:> inventory purposes.
:> 
:> People would really like the speed number printed on the chip, not what
:> it's currently running at, if that's retrievable :)
:
:Can't mask the speed number.
:
:Chips with a lower printed number are just chips that failed
:testing at higher clock rates.  Sometimes, they don't even
:fail, if they have a big demand swing.  8-).
:
:I guess they could laser it out...
:
:If Intel really didn't want overclocking to happen, they would
:put the clock on board the CPU, and make it an output, not an
:input... 8-) 8-).
:
:-- Terry

Actually, Intel did just that on their Celerons a little while after
they were first introduced.  People realized that Intel was stamping
chips that tested at higher clock rates with lower clock labels
in order to keep their lower-rated distribution pipelines full.  That
created a major overclocking craze on the Celeron line as well as no
small amount of grey-market relabeling of chips.  This also led to a
certain percentage of grey-market relabeled chips failing since not
all the lower-rated chips passed the higher rated tests.  Enough did,
however, and Intel actually began losing market share in their
higher-rated chips to their lower-rated chips.  Oops!

To combat this Intel actually started either lasering or fuse-blowing
the PLLs on the chips to make them match their labels and prevent
them from being too seriously overclocked.  I don't know if they bother
to do it anymore, though, as the chip speed testing gap is now back
to normal... packaging and heat dissipation has become important again.

-Matt


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Terry Lambert

Doug White wrote:
> I've been asked several times about how to get CPU speed information for
> inventory purposes.
> 
> People would really like the speed number printed on the chip, not what
> it's currently running at, if that's retrievable :)

Can't mask the speed number.

Chips with a lower printed number are just chips that failed
testing at higher clock rates.  Sometimes, they don't even
fail, if they have a big demand swing.  8-).

I guess they could laser it out...

If Intel really didn't want overclocking to happen, they would
put the clock on board the CPU, and make it an output, not an
input... 8-) 8-).

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Doug White

On Thu, 14 Mar 2002, Jordan Hubbard wrote:

> > What for?  You haven't caught the Megahertz bug too, have you? 8)
>
> I'm not supposed to focus on Megahertz, I work for Apple, but various
> benchmarking folks also like to be able to print stats like this out
> on their comparison charts and it seems a lot easier than grepping
> /var/run/dmesg.boot. :)

I've been asked several times about how to get CPU speed information for
inventory purposes.

People would really like the speed number printed on the chip, not what
it's currently running at, if that's retrievable :)

Doug White|  FreeBSD: The Power to Serve
[EMAIL PROTECTED] |  www.FreeBSD.org


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Terry Lambert

Josh Paetzel wrote:
> This is a perfect example of, "Just because you can do something,
> doesn't mean you should."
> 
> I wouldn't see anything wrong with grabbing the clock frequency of the
> first cpu in the system and noting in the man page that if you have
> multiple cpus and you aren't running them at the same frequency, then
> the reported value is applicable only to the first cpu.
> 
> This would save a ton of time in implementing Jordan's ideas, at the
> cost of not being able to deal correctlywith a situation that
> (hopefully) isn't too common in the field.  The other less tangible
>  disadvantage to my suggestion is that it takes us one step further in our
> single-cpu-centric userland, ala top, uptime, and so forth only
> displaying stats for "one" cpu.

Incorrect information is always worse than no information.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Brooks Davis

On Fri, Mar 15, 2002 at 10:08:53AM +, Josh Paetzel wrote:
> This is a perfect example of, "Just because you can do something, 
> doesn't mean you should."
> 
> I wouldn't see anything wrong with grabbing the clock frequency of the 
> first cpu in the system and noting in the man page that if you have 
> multiple cpus and you aren't running them at the same frequency, then 
> the reported value is applicable only to the first cpu.
> 
> This would save a ton of time in implementing Jordan's ideas, at the 
> cost of not being able to deal correctlywith a situation that 
> (hopefully) isn't too common in the field.  The other less tangible
>  disadvantage to my suggestion is that it takes us one step further in our 
> single-cpu-centric userland, ala top, uptime, and so forth only 
> displaying stats for "one" cpu.

That would be shortsighted and save nearly nothing.  I certaintly would
not have a problem with doing something lame in the first implementation
like just looped over the number of CPUs to create identical (possiably
wrong) per-cpu info.  That would add maybe half a dozen lines of code
and would be right in most cases.  However, there's no telling what the
future holds and mismatched CPUs might become more common with time so
we should avoid intrenching poorly designed sysctls when they don't add
much to the ease of implementation.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4



msg32878/pgp0.pgp
Description: PGP signature


Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-15 Thread Josh Paetzel

On Wed, Mar 13, 2002 at 08:46:46PM -0800, Terry Lambert wrote:
> Matthew Emmerton wrote:
> > > > > This was actually discussed a while back (a month or two ago).
> > > > >
> > > > > It got really bogged down when someone pointed out that
> > > > > they were running CPUs with different clock rates in their
> > > > > SMP box, just to see what the net effect would be.  THe
> > > > > problem was, of course, which one do you report, when the
> > > > > numbers don't match exactly, and/or how do you report both
> > > > > (or N)?
> > 
> > I thought it was a real bad thing to run CPUs in SMP systems at different
> > clock rates.  In fact, I never thought it was possible.  I know I can't on
> > my old 2-way P166 box, but things have changed a lot since '91.
> 
> It depends on the stepping, and that the external interfaces
> are all the same (voltage, clock speed for memory and I/O,
> etc.).
> 
> PIII's can run this way, for sure.

This is a perfect example of, "Just because you can do something, 
doesn't mean you should."

I wouldn't see anything wrong with grabbing the clock frequency of the 
first cpu in the system and noting in the man page that if you have 
multiple cpus and you aren't running them at the same frequency, then 
the reported value is applicable only to the first cpu.

This would save a ton of time in implementing Jordan's ideas, at the 
cost of not being able to deal correctlywith a situation that 
(hopefully) isn't too common in the field.  The other less tangible
 disadvantage to my suggestion is that it takes us one step further in our 
single-cpu-centric userland, ala top, uptime, and so forth only 
displaying stats for "one" cpu.

Josh
 
> > If you want to find out who's doing it, you only need to search
> the SMP list archives; it wasn't important enough for me to commit
> the message to memory, I only remember the fact that someone was
> doing it successfully.
> 
> -- Terry
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-hackers" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Hiten Pandya

--- Jordan Hubbard <[EMAIL PROTECTED]> wrote:
> I'm not supposed to focus on Megahertz, I work for Apple, but various
> benchmarking folks also like to be able to print stats like this out
> on their comparison charts and it seems a lot easier than grepping
> /var/run/dmesg.boot. :)

I personally like the idea of these sysctls for cpu stats.. probably we
can have cpu.1.x.x and cpu.2.x.x and so on... just a thought :)

Regards,

  -- Hiten Pandya
  -- <[EMAIL PROTECTED]>

__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Jordan Hubbard

> What for?  You haven't caught the Megahertz bug too, have you? 8)

I'm not supposed to focus on Megahertz, I work for Apple, but various
benchmarking folks also like to be able to print stats like this out
on their comparison charts and it seems a lot easier than grepping
/var/run/dmesg.boot. :)

- Jordan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Doug Rabson

On Thu, 14 Mar 2002, Michael Smith wrote:

> > hw.busfrequency = 133326902
>
> Not typically obtainable.  And which bus?

This is available for ia64. I think the speed returned by ia64 firmware
for this is the FSB speed.

>
> > hw.cpufrequency = 66700
>
> Should be obtainable on Alpha and Sparc, and calculable on x86 (though it
> will probably have to be calculated at the time the sysctl is read, since
> it's variable).

Certainly also available for ia64.

>
> > hw.cachelinesize = 32
> > hw.l1icachesize = 32768
> > hw.l1dcachesize = 32768
> > hw.l2cachesize = 262144
>
> Most of these can be obtained, one way or another.

I can get this too. Also sizes of various levels of TLB too for fun...

-- 
Doug Rabson Mail:  [EMAIL PROTECTED]
Phone: +44 20 8348 6160



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-14 Thread Michael Smith

> hw.busfrequency = 133326902

Not typically obtainable.  And which bus?

> hw.cpufrequency = 66700

Should be obtainable on Alpha and Sparc, and calculable on x86 (though it 
will probably have to be calculated at the time the sysctl is read, since 
it's variable).

> hw.cachelinesize = 32
> hw.l1icachesize = 32768
> hw.l1dcachesize = 32768
> hw.l2cachesize = 262144

Most of these can be obtained, one way or another.

> hw.l2settings = -2147483648

No idea what that's meant to mean.

> Assuming that some or all of this information can be derived on x86 /
> alpha / sparc, how useful do folks think it would be to have this
> information be available from sysctl space?  I personally would love
> to see CPU and bus speed info.

What for?  You haven't caught the Megahertz bug too, have you? 8)

-- 
To announce that there must be no criticism of the president,
or that we are to stand by the president, right or wrong, is not
only unpatriotic and servile, but is morally treasonable to 
the American public.  - Theodore Roosevelt



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Terry Lambert

Matthew Emmerton wrote:
> > > > This was actually discussed a while back (a month or two ago).
> > > >
> > > > It got really bogged down when someone pointed out that
> > > > they were running CPUs with different clock rates in their
> > > > SMP box, just to see what the net effect would be.  THe
> > > > problem was, of course, which one do you report, when the
> > > > numbers don't match exactly, and/or how do you report both
> > > > (or N)?
> 
> I thought it was a real bad thing to run CPUs in SMP systems at different
> clock rates.  In fact, I never thought it was possible.  I know I can't on
> my old 2-way P166 box, but things have changed a lot since '91.

It depends on the stepping, and that the external interfaces
are all the same (voltage, clock speed for memory and I/O,
etc.).

PIII's can run this way, for sure.

If you want to find out who's doing it, you only need to search
the SMP list archives; it wasn't important enough for me to commit
the message to memory, I only remember the fact that someone was
doing it successfully.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Nate Williams

> hw.busfrequency = 133326902
> hw.cpufrequency = 66700
> hw.cachelinesize = 32
> hw.l1icachesize = 32768
> hw.l1dcachesize = 32768
> hw.l2settings = -2147483648
> hw.l2cachesize = 262144
> 
> Assuming that some or all of this information can be derived on x86 /
> alpha / sparc, how useful do folks think it would be to have this
> information be available from sysctl space?  I personally would love
> to see CPU and bus speed info.

Note, CPU speed on x86 laptops is variable depending on power control.
I'm not sure this is the case on the Apple hardware.


Nate

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Matthew Emmerton

> On Wed, 13 Mar 2002, Brooks Davis wrote:
>
> > On Wed, Mar 13, 2002 at 04:25:00PM -0800, Terry Lambert wrote:
> > > This was actually discussed a while back (a month or two ago).
> > >
> > > It got really bogged down when someone pointed out that
> > > they were running CPUs with different clock rates in their
> > > SMP box, just to see what the net effect would be.  THe
> > > problem was, of course, which one do you report, when the
> > > numbers don't match exactly, and/or how do you report both
> > > (or N)?

I thought it was a real bad thing to run CPUs in SMP systems at different
clock rates.  In fact, I never thought it was possible.  I know I can't on
my old 2-way P166 box, but things have changed a lot since '91.

--
Matt Emmerton


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Matthew N. Dodd

On Wed, 13 Mar 2002, Jordan Hubbard wrote:
> hw.busfrequency = 133326902
> hw.cpufrequency = 66700

hw.freq.{bus,cpu}

> hw.cachelinesize = 32
> hw.l1icachesize = 32768
> hw.l1dcachesize = 32768
> hw.l2settings = -2147483648
> hw.l2cachesize = 262144

hw.cache.size.line
hw.cache.size.l1.i
hw.cache.size.l1.d
hw.cache.l2.settings
hw.cache.size.l2

Right?

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |   2 x '84 Volvo 245DL| ix86,sparc,pmax |
| http://www.jurai.net/~winter |  For Great Justice!  | ISO8802.5 4ever |


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread George V. Neville-Neil

Wouldn't it make the most sense to just have the

hw.cpu# 

stuff you mentioned in email?  That's the easiest way to understand
the data as a user at least.

Later,
George


-- 
George V. Neville-Neil  [EMAIL PROTECTED]
Neville-Neil Consulting www.neville-neil.com

"We should not be ashamed to acknowledge truth from whatever source it
comes to us, even if it is brought to us by former generations and
foreign peoples.  For him who seeks the truth there is nothing of
higher value than truth itself."  al-Kindi (c 801-66)



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Julian Elischer



On Wed, 13 Mar 2002, Brooks Davis wrote:

> On Wed, Mar 13, 2002 at 04:25:00PM -0800, Terry Lambert wrote:
> > This was actually discussed a while back (a month or two ago).
> > 
> > It got really bogged down when someone pointed out that
> > they were running CPUs with different clock rates in their
> > SMP box, just to see what the net effect would be.  THe
> > problem was, of course, which one do you report, when the
> > numbers don't match exactly, and/or how do you report both
> > (or N)?
> 

certainly no reason to not have:
hw.cpu.0.clock

etc.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Brooks Davis

On Wed, Mar 13, 2002 at 04:25:00PM -0800, Terry Lambert wrote:
> This was actually discussed a while back (a month or two ago).
> 
> It got really bogged down when someone pointed out that
> they were running CPUs with different clock rates in their
> SMP box, just to see what the net effect would be.  THe
> problem was, of course, which one do you report, when the
> numbers don't match exactly, and/or how do you report both
> (or N)?

My suspicion is that everything that currently runs FreeBSD reliably
would be just fine with this setup, but when I brought this up before I
recalled seeing a systems with different speeds on each CPU so I
mentioned it.  I think many of these settings should probalby go in
hw.cpu#.xxx syctls since they are cpu attributes not system ones.  It
seems that the various HA systems with hot swapable CPUs are likely to
get into situations where the CPUs don't quite match so it would be nice
if we reported things that way.

If we went down the path of having per-cpu sysctls then it would also be
logical to export CPU versioning info as well as CPU features.  That
would be port specific of course, but I'm sure we could manage to be
more consistant then Linux's /proc/cpuinfo.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4



msg32809/pgp0.pgp
Description: PGP signature


Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Terry Lambert

Alfred Perlstein wrote:
> * Jordan Hubbard <[EMAIL PROTECTED]> [020313 15:56] wrote:
[ ... ]
> > Assuming that some or all of this information can be derived on x86 /
> > alpha / sparc, how useful do folks think it would be to have this
> > information be available from sysctl space?  I personally would love
> > to see CPU and bus speed info.
> 
> Those look pretty good.  Having the cacheline size available
> would also help quite a bit for avoiding false sharing for
> allocation of data structures in smp.

This was actually discussed a while back (a month or two ago).

It got really bogged down when someone pointed out that
they were running CPUs with different clock rates in their
SMP box, just to see what the net effect would be.  THe
problem was, of course, which one do you report, when the
numbers don't match exactly, and/or how do you report both
(or N)?

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Alfred Perlstein

* Jordan Hubbard <[EMAIL PROTECTED]> [020313 15:56] wrote:
> hw.busfrequency = 133326902
> hw.cpufrequency = 66700
> hw.cachelinesize = 32
> hw.l1icachesize = 32768
> hw.l1dcachesize = 32768
> hw.l2settings = -2147483648
> hw.l2cachesize = 262144
> 
> Assuming that some or all of this information can be derived on x86 /
> alpha / sparc, how useful do folks think it would be to have this
> information be available from sysctl space?  I personally would love
> to see CPU and bus speed info.

Those look pretty good.  Having the cacheline size available
would also help quite a bit for avoiding false sharing for
allocation of data structures in smp.

-- 
-Alfred Perlstein [[EMAIL PROTECTED]]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Interesting sysctl variables in Mac OS X with hw info

2002-03-13 Thread Jordan Hubbard

hw.busfrequency = 133326902
hw.cpufrequency = 66700
hw.cachelinesize = 32
hw.l1icachesize = 32768
hw.l1dcachesize = 32768
hw.l2settings = -2147483648
hw.l2cachesize = 262144

Assuming that some or all of this information can be derived on x86 /
alpha / sparc, how useful do folks think it would be to have this
information be available from sysctl space?  I personally would love
to see CPU and bus speed info.

- Jordan

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message