[erlang-questions] FreeBSD cpu topology detection

Per Hedeland per@REDACTED
Sat Oct 18 12:55:54 CEST 2014


Garret Smith <garret.smith@REDACTED> wrote:
>
>On Fri, Oct 17, 2014 at 9:34 AM, Garret Smith <garret.smith@REDACTED> wrote:
>> On Thu, Oct 16, 2014 at 6:04 PM, Garret Smith <garret.smith@REDACTED> wrote:
>>> CPU topology detection seems broken (at least incomplete) on FreeBSD.
>>> erlang:system_info(cpu_topology) returns 'undefined' on the few machines I
>>> have at my disposal.
>>>
>>> I'm going to take a stab at a patch, but I'd like some help from other
>>> FreeBSD users out there first.
>>>
>>> Can any FreeBSD users please send me:
>>>     a) the output of 'sysctl kern.sched.topology_spec'
>>>     b) a few lines from your 'dmesg' about the processor configuration like:
>>> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
>>> FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads
>>>
>>> Even if your topology is correctly determined, this info will help me ensure
>>> I don't introduce a regression.
>>>
>>> Thanks,
>>> Garret
>>
>> Thank you to all who sent me information.
>>
>> I now have a good collection of systems with {2, 4, 8} logical
>> processors and {2, 4} cores.  Any info on machines with >8 logical
>> processors would be appreciated.
>>
>> No one reported that topology detection worked.

Well, you didn't ask for that information.:-) Nor did you mention either
the FreeBSD or the OTP version where you were seeing the problem...
FWIW, it seems to work just fine for me on the 2-core/4-logical and
4-core/8-logical FreeBSD systems I use regularly, with a variety of
FreeBSD and OTP versions. I'm also pretty sure Raimo would have
mentioned if it was broken on any of his machines.

Since another poster also saw the problem, and mentioned that he was
running FreeBSD 10.something, it might be a FreeBSD-10-specific problem
- personally I haven't tried Erlang/OTP on FreeBSD-10 yet.

>First cut is up at:
>https://github.com/garret-smith/otp/tree/gs-freebsd-cpu-topology
>I get the correct topology for my machine and the XML samples I was sent.
>
>Any additional testing before I submit to the OTP team next week would
>be appreciated.  I don't think they have a lot of boxen to really
>exercise this.

I'll try to verify that it doesn't break what is working for me...:-)

--Per Hedeland

PS Also note that there is an actively maintained FreeBSD "port" for
Erlang (currently at 17.3) - it seems a bit unlikely that total
brokenness of the topology detection *in the version used by the port*
would go unnoticed by the port maintainer.
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
https://urldefense.proofpoint.com/v1/url?u=http://erlang.org/mailman/listinfo/erlang-questions&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=%2BeQ4KDUqB%2Ba5p47eZISTJX4bLLnoLmTlWbkSNWD9lg0%3D%0A&m=S7VxcPR0m2tbWMVoVr%2F5WVSxrZA3pVU43ir4DdF1Yes%3D%0A&s=a6d32737122514ab606373a0be697fdba3d3703d986c73f77b67b4d557e29d5c



More information about the erlang-questions mailing list