[erlang-questions] FreeBSD cpu topology detection
Raimo Niskanen
raimo+erlang-questions@REDACTED
Mon Oct 20 09:17:59 CEST 2014
On Sat, Oct 18, 2014 at 12:55:54PM +0200, Per Hedeland wrote:
> 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.
Well, as you said, the information was not asked for...
erlang:system_info(cpu_topology) -> undefined on all the machines i
reported for. And that with a mixture of erlang installed from
FreeBSD ports and built from source (I have not tried all cominations).
But all machines report the correct number of cores in the SMP prompt and
starts the correct number of schedulers, so missing cpu topology is not
something that affects our daily tests therefore has not been prioritized,
hardly even noticed.
/ Raimo Niskanen
>
> 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
> http://erlang.org/mailman/listinfo/erlang-questions
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list