mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>,
	likunyu10 <likunyu10@163.com>,
	kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	likunyu15 <likunyu15@jd.com>
Subject: Re: [PATCH] drivers/nvme/host/pci: Fix the asynchronous detection issue of nvme devices
Date: Fri, 25 Jul 2025 10:57:47 +0900	[thread overview]
Message-ID: <1f447780-09a2-4f97-a17d-5489ebd4da5f@kernel.org> (raw)
In-Reply-To: <58c289ef-770b-4524-b38d-ebdb51ccc8f4@acm.org>

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

      reply	other threads:[~2025-07-25  1:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-20 18:51 likunyu10
2025-07-24 16:07 ` Bart Van Assche
2025-07-25  1:57   ` Damien Le Moal [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=1f447780-09a2-4f97-a17d-5489ebd4da5f@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=likunyu10@163.com \
    --cc=likunyu15@jd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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®