Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: weipengliang <weipengliang@xiaomi.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v3] PCI: Avoid unnecessary cpu_hotplug_disable() for non-NUMA devices
Date: Fri, 22 May 2026 09:56:47 +0000	[thread overview]
Message-ID: <20260522095648.676831F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260522084844.1901-1-weipengliang@xiaomi.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Commit message discrepancy regarding the placement of cpu_hotplug_enable().
--

commit 9acd77cab9fa6f681c21a1bfe522a33f79ec6605
Author: weipengliang <weipengliang@xiaomi.com>

PCI: Avoid unnecessary cpu_hotplug_disable() for non-NUMA devices

This commit limits cpu_hotplug_disable() and cpu_hotplug_enable() calls
to the NUMA-valid code path. This removes overhead for non-NUMA devices
where local_pci_probe() can be called directly.

> Move cpu_hotplug_disable() into the NUMA-valid else branch so non-NUMA
> devices skip it entirely. Place a single cpu_hotplug_enable() after
> destroy_work_on_stack() to keep hotplug disabled during flush_work()
> and local_pci_probe(), preventing CPU offline from migrating the probe
> work to an incorrect NUMA node.

> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
[ ... ]
> @@ -414,11 +414,11 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
>  			error = local_pci_probe(&ddi);
>  		}
>  
> +		cpu_hotplug_enable();
>  		destroy_work_on_stack(&arg.work);

[Severity: Low]
This isn't a bug, but does the commit message accurately describe the
code sequence here?

The commit message mentions placing cpu_hotplug_enable() after
destroy_work_on_stack(), but the code actually places it immediately
before.

Could the commit message be updated to match the code, or should the
code be adjusted to match the intent described in the commit message?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260522084844.1901-1-weipengliang@xiaomi.com?part=1

  reply	other threads:[~2026-05-22  9:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-22  6:11 [PATCH] PCI: Avoid unnecessary cpu_hotplug_disable() for non-NUMA devices weipengliang
2026-05-22  7:12 ` Lukas Wunner
2026-05-22  7:54   ` [PATCH v2] " weipengliang
2026-05-22  8:02     ` Lukas Wunner
2026-05-22  8:11       ` weipengliang
2026-05-22  8:22       ` weipengliang
2026-05-22  8:42       ` weipengliang
2026-05-22  8:48         ` [PATCH v3] " weipengliang
2026-05-22  9:56           ` sashiko-bot [this message]
2026-05-22 10:53           ` [PATCH v4] " weipengliang
2026-05-22  8:32     ` [PATCH v2] " sashiko-bot

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=20260522095648.676831F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=weipengliang@xiaomi.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