Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796399777; b=v1/XkERJPakSLn6WPzoo+lyYfPOoIB2dJ7dgpBoMcAWtJFDebxkbL6ub0czpllVUp6I1 yBJYs/0YjWn6+SXOA+OylWRzvKBuTT0ouemGvguMGQ5OlT9sX/TCQBWg7xuL9ZnX2FCsE 3LfE2V8/ogrNdTBPR8FtIJ/5xdL/NJ8vrySPEY6RIvyyi3ChmEdm9XkwTg/YX4hjDxc6Z lhkmBJdtU6oI62N98V0Zrwrbmj+NCfK2BjEVG9BB4x5rJvHQMe3NqAdQx2/eIKXZVDK0b JhqytwZ5KmY87p4jH9+ti0R4DnC7Z1AKtJ2Uu5TFRnNN0nt43B/Qj3yBNUpIyxEQgJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796399777; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=JYxJ1O/M/E/FnH+hFsA28eX6tL/p4XV6sNMk/KvVCzQ=; b=f/sziwzL2REj/vnhqGzS72U7vsrX/oMXZM6s1yeGahAq5M5eSxha54xxUM/H3J11FejA VJ+cufGyBZIOQHTCWqnRHVlyvsjfE497ewPlnFpCJDXhnjGZUWI8yf3FXgOWBKB57cNPW iAJ04O814sp8OlIV2iurSF+akWqHlPyrG4sJBUI4jevmdGXfSwxZ+U9WZWosyNN5DmpGD bW1tKbHcsm2Ona+5uZCkOhulrRUoe/QroUE7hTByMJSou8gID1m+wadYUmYCYj75Ud4kT e6R5G9+N8P/v8B21LWFRjPqs3Nob1uq0n0ZLhb6LNXTex7PonxIq55j1yxJi12kNsGw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=orcQjHkd; arc=none smtp.remote-ip=209.85.128.50 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FDCD606A32D for ; Fri, 4 Dec 2026 15:56:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3FDCD606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=orcQjHkd Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4bb6c7b6dbdso11193085e9.0 for ; Fri, 04 Dec 2026 07:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796399776; x=1797004576; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JYxJ1O/M/E/FnH+hFsA28eX6tL/p4XV6sNMk/KvVCzQ=; b=orcQjHkdNFUXs6vDZKyo2gJaG03vxuAouhK5ixMjRHdZC3FqHaW+P7UDSZlh3MoiFS 7Vi22J5HgBJnv2t93Z5f9Dh9BxPWakYsturqeNBr3mAdHVFgsmYP4FEesdmnh2w+KvMN a/kco2GHZIEK/t3mz2Sd6+WElv1q0pwXL/SXRc1YQkzuG4msIEFRRq2BTnPMjowLdsJb jF/laVbKK1k6CmUDm+4ePeN3Ax0BSKMebbQW6h+TawBdzzvZygRFYhlCkfD8Ak933LTQ q2Ddd6NBLKe53DCxO2LbIv9u3dPOfGxsw2gjlB90VJM1mG1GbFcIj2WDkYhn3zfOJ/Dc BKUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796399776; x=1797004576; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=JYxJ1O/M/E/FnH+hFsA28eX6tL/p4XV6sNMk/KvVCzQ=; b=js40qOBzzz4vF5XdZfylW6VfItjIF8tDzNJ2rnKgUuCcPaH6g/zP5sXErVZ16qSvzJ t8mmAI4n3SQyy6OrY8pKTJV0E26CiiOt98Sizu/ZpxOpVYvKUrFi21XbAiePS/flOwHT rWsFQKKtUEzHJnGIgzl2ghfgh/k2N7YjWiCZa0UYO/pga816WpzoOIFYBy335HGhs2/u uc9Drqk+1khwDpIXDSMKhybbDlzK4kmuZm2K+6Ca6n5JTX+U71zIh+Gr/em6ILW8dsKF y6IYEN+AIV7I32NtzXvTL9PC2dpebwGZZqchbl9kTAHyX6ZiZ5PPGgmJJA4NFaSJEz0Z Yopg== X-Forwarded-Encrypted: i=1; AL+hErG4WXi3YCynjPYRuKT2uLcM72Ee2TR+W4ttQtXax4hyK/ZrGoFHK8C6oqC3tlTTJdYV5VrfKOcagSRCuA==@vger.kernel.org X-Gm-Message-State: APuU4Z+56px6ytvYKh3s1mwz6wuQYDTaWnb4e1DJlEwdca/5hqUpbzo9 swFQuqE1ugVPV/pGma2Ao56zhaYFO8nUGBcvgN2tXT6MMlNIbC0C13agU0erG9ky X-Gm-Gg: AZFdTZcn/64haolvVI+Crreioe4VjabgNctVzVJ0vEa8lkW2Sj3PCCjeV4Jq83i+SnO GiVRYM5YyNNb2yjIK9cAEkDZQ/1swvYNUWGAR1yznwrslLzZGGP1IcqIlrykCsbY2Hrjnjj24Sw uACPDkEzPC4SY4aQNIyIviwTHpJUi+CE2CdYB0fXP3m98uIGZ4NPXt4W4/4rHqYy+ZkTni3hSzv 2eu7VwQu2w3nBF8LSy1L/mgpbBT+t+C693vma6d/z9lQEecHClHNFgBDoong72t6tuw5lj0znvr TOfSu7t1n8wasmka2jMnVNl5D7yeGep871y7sND6K2V7AkbAbDN5U7SQc7eDrjqFACanKarGfUF CzOf3NBEAeSB8ryZnnHC/UU3Ob9VwmD2Ba2Jr+3ear9I80KuaOmq5t6osi3op6zZodzxvgzVvDM B6kU7SlICA0d1Wb7RWeJ0Rf6echPkcBsmIXZSufdC06CpZgFDcNbDWCZSlEX9r320+EPdVMK9fS 93/8/fTpqGp50TudTN7oea84+tznkJutVruZk1b4/yZ/XyJkplIgjaEhmpCjiD+CzpXYlrzs/lN 7/b5lA5GfFHNV5TAA54Ym3SYoS/bILA= X-Received: by 2002:a05:600c:1d15:b0:4bb:875b:3d91 with SMTP id 5b1f17b1804b1-4bbeb8d0a28mr49513725e9.30.1796399775444; Fri, 04 Dec 2026 07:56:15 -0800 (PST) Received: from CachyOS ([176.88.127.1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbdff53b41sm187362675e9.0.2026.12.04.07.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 07:56:15 -0800 (PST) From: =?UTF-8?q?Asaf=20Nuri=20Bertizlio=C4=9Flu?= 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 Message-ID: <20261204155342.59512-1-asafbertizlioglu@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261205-coretemp-core-limit-v1-1-a7020e0e4208@gmail.com> References: <20261205-coretemp-core-limit-v1-1-a7020e0e4208@gmail.com> X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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