From: "Asaf Nuri Bertizlioğlu" <asafbertizlioglu@gmail.com>
To: jm5905938@gmail.com
Cc: linux@roeck-us.net, linux-hwmon@vger.kernel.org,
bakshansky.lists@gmail.com, sashiko-reviews@lists.linux.dev
Subject: Re: [PATCH] hwmon: (coretemp) Fix missing sensors with uneven core counts
Date: Fri, 4 Dec 2026 18:53:42 +0300 [thread overview]
Message-ID: <20261204155342.59512-1-asafbertizlioglu@gmail.com> (raw)
In-Reply-To: <20261205-coretemp-core-limit-v1-1-a7020e0e4208@gmail.com>
On Sat, Dec 05, 2026 at 01:46:08AM +1100, Aveline Noir wrote:
> topology_num_cores_per_package() only counts the cores of one package.
> If another package has more cores, e.g. because the BIOS disabled cores
> on only one CPU, the extra cores get no temperature sensors.
[...]
> Only tested in QEMU, with 2+4 cores.
Could you share the QEMU command line you used? Here coretemp does not
load in a guest at all. With QEMU 11.1.4, KVM and -cpu host on an
i7-14700F, the guest has no dtherm flag (KVM only exposes ARAT in CPUID
leaf 6) and insmod coretemp.ko fails with -ENODEV. QEMU does not offer
a dtherm CPU property either.
I also could not get an uneven count from QEMU. With
-smp cpus=6,sockets=2,cores=4,maxcpus=8 the guest prints
"Num. cores per package: 4", because topo_register_apic() also puts
the not-present APICs in the domain maps. The same happens with 2 cores
present in package 0 and 4 in package 1. CPU hot-add is covered as
well, since topology_hotplug_apic() rejects APIC IDs that were not
registered at boot. So the count can only be too small when the package
with the lowest APIC ID has fewer registered cores than another package.
Have you seen that happen, with "Adding Core N failed" from the
unpatched driver, on real hardware or in a VM? Sashiko raised the same
concern on b89e1255c92b, and at the time it was assumed not to be valid:
https://lore.kernel.org/linux-hwmon/8a756afa-20d1-49a3-8cb1-7f8c62d5700e@roeck-us.net/
The change itself looks safe to me: num_possible_cpus() is a valid upper
bound and costs no more than the old 512-entry array on most systems.
It would help to state the exact condition in the commit message.
Thanks,
Asaf
next prev parent reply other threads:[~2026-12-04 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 14:46 [PATCH] hwmon: (coretemp) Fix missing sensors with uneven core counts Aveline Noir
2026-12-04 15:04 ` sashiko-bot
2026-12-04 15:13 ` Aveline Noir
2026-12-04 20:34 ` Guenter Roeck
2026-12-05 6:11 ` Aveline Noir
2026-12-04 15:53 ` Asaf Nuri Bertizlioğlu [this message]
2026-12-04 16:04 ` Aveline Noir
2026-12-04 16:30 ` Asaf Nuri Bertizlioğlu
2026-12-04 16:43 ` Aveline Noir
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204155342.59512-1-asafbertizlioglu@gmail.com \
--to=asafbertizlioglu@gmail.com \
--cc=bakshansky.lists@gmail.com \
--cc=jm5905938@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.