* it iterates through the kstat-structures with kstat_lookup with itself traverses through the kstat-list. This leads to a O(n^2) complexity, instead of walking the list ourself once O(n).
* it may go into a infinite loop if * a CPU is enabled between kstat_chain_update() and the "ncpu = sysconf(_SC_NPROCESSORS_CONF)" in sigar_get_kstats() which can happen if zones are used and processors are added to the zone.
I'm working on a patch to solve this with a single linear walk over the whole kstat-chain to find all our instances that we really have in there.
For each of the kstat_lookup traverse the list again and again. My current test program does 1 run through the full list to get the full list of cpu_info's and a 2nd to copy out all the ptr's to kstat_t's. That's 2 runs no matter how many CPUs there are O(1) compared to O(n^2).