mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection issue of nvme devices
@ 2025-07-20 18:51 likunyu10
  2025-07-24 16:07 ` Bart Van Assche
  0 siblings, 1 reply; 3+ messages in thread
From: likunyu10 @ 2025-07-20 18:51 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi; +Cc: linux-nvme, linux-kernel, likunyu15

From: likunyu15 <likunyu15@jd.com>

PROBE_PREFER_ASYNCHRONOUS asynchronous detection has a significant impact
on important devices. For example, if a server has two or more nvme disk
devices, it can cause disk loading disorder, which can also have a
certain impact on actual production environments.

Signed-off-by: likunyu15 <likunyu15@jd.com>
---
 drivers/nvme/host/pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 320aaa41ec39..c7f90621e633 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3832,7 +3832,6 @@ static struct pci_driver nvme_driver = {
 	.remove		= nvme_remove,
 	.shutdown	= nvme_shutdown,
 	.driver		= {
-		.probe_type	= PROBE_PREFER_ASYNCHRONOUS,
 #ifdef CONFIG_PM_SLEEP
 		.pm		= &nvme_dev_pm_ops,
 #endif
-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection issue of nvme devices
  2025-07-20 18:51 [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection issue of nvme devices likunyu10
@ 2025-07-24 16:07 ` Bart Van Assche
  2025-07-25  1:57   ` Damien Le Moal
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2025-07-24 16:07 UTC (permalink / raw)
  To: likunyu10, kbusch, axboe, hch, sagi; +Cc: linux-nvme, linux-kernel, likunyu15

On 7/20/25 11:51 AM, likunyu10 wrote:
> PROBE_PREFER_ASYNCHRONOUS asynchronous detection has a significant impact
> on important devices. For example, if a server has two or more nvme disk
> devices, it can cause disk loading disorder, which can also have a
> certain impact on actual production environments.

That's intentional. Please fix your user space code that uses hard-coded
NVMe block device names or introduce a mechanism in user space for block
devices that is similar to the predictable network interface names
mechanism. See also https://systemd.io/PREDICTABLE_INTERFACE_NAMES/.

Bart.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection issue of nvme devices
  2025-07-24 16:07 ` Bart Van Assche
@ 2025-07-25  1:57   ` Damien Le Moal
  0 siblings, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2025-07-25  1:57 UTC (permalink / raw)
  To: Bart Van Assche, likunyu10, kbusch, axboe, hch, sagi
  Cc: linux-nvme, linux-kernel, likunyu15

On 7/25/25 01:07, Bart Van Assche wrote:
> On 7/20/25 11:51 AM, likunyu10 wrote:
>> PROBE_PREFER_ASYNCHRONOUS asynchronous detection has a significant impact
>> on important devices. For example, if a server has two or more nvme disk
>> devices, it can cause disk loading disorder, which can also have a
>> certain impact on actual production environments.
> 
> That's intentional. Please fix your user space code that uses hard-coded
> NVMe block device names or introduce a mechanism in user space for block
> devices that is similar to the predictable network interface names
> mechanism. See also https://systemd.io/PREDICTABLE_INTERFACE_NAMES/.

Userspace can use /dev/disk/by-id or any of the other /dev/disk/by-* for
reliable device names. Using directly /dev/sd* or /dev/nvme* is bad userspace
practice.

Even without asynchronous device scan, adding or removing a device to a system
can change device file names. The symlinks in /dev/disk/by-id are stable and
will exist as long as a device is present.


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-25  1:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-20 18:51 [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection issue of nvme devices likunyu10
2025-07-24 16:07 ` Bart Van Assche
2025-07-25  1:57   ` Damien Le Moal

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®