MINOR: debug: detect CPU model and store it in post_mortem
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Nov 2023 10:55:22 +0000 (11:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Nov 2023 14:39:21 +0000 (15:39 +0100)
commit0cc799bdd1e7ad4856593711f3df3b5539a865d6
tree633e015dfa9d943040bc2a64ea53c921e6833070
parent2974f3e71b91c34ac5407673f2db7d1028d81383
MINOR: debug: detect CPU model and store it in post_mortem

The CPU model and type has significant impact on certain bugs, such
as contention issues caused by CPUs having split L3 caches, or stricter
memory models that exhibit some barrier issues. It's complicated though
because the info about the model depends on the arch. For example, x86
reports an SKU name while ARM rather reports the CPU core types, families
and versions for each CPU core. There, the SoC will sometimes be reported
in the device tree or DMI info instead. But we don't really care, it's
essentially useful to know if the code is running on an armv8.0 such as
A53, a 8.2 such as A55/A76/Neoverse etc. For MIPS the model appears to
generally be there, and in addition the SoC is often present in the
"system type" field before the first CPU, and the type of machine in the
"machine" field, to replace the missing DMI and DT, so they are also
collected. Note that only the first CPU is checked and reported, that's
expected to be vastly sufficient, since we're just trying to spot known
incompatibilities or issues.
src/debug.c