I do understand what the code is doing but question whether that's what it should be doing. While it's ultimately a matter of opinion, it violates the 'principle of least surprise' for me and also my Solaris colleagues.
At any rate, I finally managed to find a multi-core linux box I could try this on and have confirmed that the associated linux facts behave in the way I would have expected them to on Solaris -
physicalprocessorcount => 1
processor0 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor1 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor2 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor3 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor4 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor5 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor6 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processor7 => Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
processorcount => 8
This is a 4-core CPU with 8 threads.
See the spec for the i7-2600
http://ark.intel.com/products/52213So I do think the Solaris behaviour is in error.
Maybe we need a 'processorcorecount' fact instead?