On Wednesday 2011-03-30 16:14, Karel Zak wrote: >On Thu, Mar 24, 2011 at 01:45:34PM +0100, Jan Engelhardt wrote: >> On a 24-thread/6-core SPARC T1, lscpu would wrongly output "5 threads >> per core". >> >> It seems that the 6c T1 is simply an 8c T1 where 2c are disabled >> (offering a lesser model for a lower price, and all that marketing > >LOL... Well, isn't that just what they similar do in the x86 segment - downclocking and selling for less.. Nobody is going to design a new die just to omit 2 or 4 cores. >> fluff). So the machine description header of the 6c T1 reports 32 >> threads, but only goes on to provide 24 elements thereafter, which is >> why Linux will report threads 24-31 as "offline". So far so good. >> >> But lscpu would take the number of all (online and offline) threads >> (32) and divides it by the number of online cores (6), which yields an >> odd 5.33 threads/core. >> >> Simply pick the number of online threads. > > OK. > >> [Also, remove stray "(s)"s that do not belong there, and properly >> declare threads, avoid using "CPU" (which is an overloaded term >> meaning either thread, or package/NUMA node).] > >avoid using "CPU(s)" is not backwardly compatible change :-( Why not? Grepping in output is not very portable - the less so when programs are translated - and I can see why sysfs chose to demand that there be just one value per file. -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html