mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Ximing Zhang <xzhangjr@gmail.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] hwmon: (coretemp) Fix handling of isolated SMT siblings
Date: Mon, 19 Oct 2026 05:46:12 -0700	[thread overview]
Message-ID: <cfcbef9e-82bd-4685-85cb-25d17f2483e4@roeck-us.net> (raw)
In-Reply-To: <20261016-codex-coretemp-housekeeping-v1-1-96618c5676b2@gmail.com>

On Fri, Oct 16, 2026 at 12:36:37PM +0400, Ximing Zhang wrote:
> From: Ximing Zhang <xzhangjr@gmail.com>
> 
> Commit 0f8b916bc5b5 ("hwmon: (coretemp) avoid RDMSR interrupts to
> isolated CPUs") prevents create_core_data() from creating temperature
> data for an isolated CPU. coretemp_cpu_online(), however, still adds
> that CPU to pdata->cpumask.
> 
> When an isolated SMT thread is processed before a housekeeping sibling,
> the mask makes coretemp_cpu_online() believe that the core is already
> represented. The housekeeping sibling then gets no temperature
> attributes. Package attributes are similarly not retried when the first
> CPU processed in a die is isolated.
> 
> The mask is also used to select a replacement CPU when a sensor target
> goes offline. Including isolated CPUs permits the driver to retarget a
> sensor to one, causing subsequent sysfs reads to send an RDMSR IPI to an
> isolated CPU.
> 
> Keep isolated CPUs out of pdata->cpumask by moving the housekeeping check
> to coretemp_cpu_online(). Sensor creation is then deferred to an eligible
> CPU, and hotplug replacement targets remain on housekeeping CPUs.
> 
> Tested on an Intel Core i7-10510U running 6.18.50-3-cachyos-lts, with
> nohz_full=1 on CPU 1 and its housekeeping SMT sibling on CPU 5. The stock
> driver omitted Core 1 after module load and retained its readable sensor
> after CPU 5 was offlined. The patched driver exposed Core 1, removed it
> when CPU 5 went offline, and restored it when CPU 5 returned.
> 
> Fixes: 0f8b916bc5b5 ("hwmon: (coretemp) avoid RDMSR interrupts to isolated CPUs")
> Cc: stable@vger.kernel.org
> Cc: Marcelo Tosatti <mtosatti@redhat.com>
> Signed-off-by: Ximing Zhang <xzhangjr@gmail.com>
> Tested-by: Asaf Nuri Bertizlioğlu <ycistak@gmail.com>

Applied.

Thanks,
Guenter

      parent reply	other threads:[~2026-10-19 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  8:36 Ximing Zhang via B4 Relay
2026-10-18 20:51 ` Asaf Nuri Bertizlioğlu
2026-10-19 12:46 ` Guenter Roeck [this message]

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=cfcbef9e-82bd-4685-85cb-25d17f2483e4@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=xzhangjr@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®