On Fri, Mar 15, 2002 at 10:08:53AM +0000, 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/pgp00000.pgp
Description: PGP signature