linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression
@ 2023-01-24  0:45 Ville Syrjala
  2023-01-24  6:21 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjala @ 2023-01-24  0:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-nvme, Christoph Hellwig, Keith Busch, Chaitanya Kulkarni,
	Gerd Bayer, Sagi Grimberg, Jens Axboe, Ville Syrjälä

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Async probe caused a regression where we fail to find the
rootfs in time, leading an unbootable machine.

rootdelay=1 can be used as a workaround but that needlessly
slows down the boot by a whole extra second.

To get the best of both worlds perhaps there should be
some kind of async probe flush/sync just before attempting
to mount the rootfs?

In the meantime just switch back to a sync probe to fix
the regression.

Cc: linux-nvme@lists.infradead.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Gerd Bayer <gbayer@linux.ibm.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Jens Axboe <axboe@fb.com>
Fixes: eac3ef262941 ("nvme-pci: split the initial probe from the rest path")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.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 1ff8843bc4b3..d0f5e93d977e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3514,7 +3514,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.39.1


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

* Re: [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression
  2023-01-24  0:45 [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression Ville Syrjala
@ 2023-01-24  6:21 ` Christoph Hellwig
  2023-01-24  8:47   ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2023-01-24  6:21 UTC (permalink / raw)
  To: Ville Syrjala
  Cc: linux-kernel, linux-nvme, Christoph Hellwig, Keith Busch,
	Chaitanya Kulkarni, Gerd Bayer, Sagi Grimberg, Jens Axboe

Err, no.  We're not going to randomly revert things.  If you want
to be productive check the one liner Keith reported in reply to the
last report.

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

* Re: [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression
  2023-01-24  6:21 ` Christoph Hellwig
@ 2023-01-24  8:47   ` Ville Syrjälä
  2023-01-24 13:41     ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä @ 2023-01-24  8:47 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, linux-nvme, Keith Busch, Chaitanya Kulkarni,
	Gerd Bayer, Sagi Grimberg, Jens Axboe

On Tue, Jan 24, 2023 at 07:21:40AM +0100, Christoph Hellwig wrote:
> Err, no.  We're not going to randomly revert things.  If you want
> to be productive check the one liner Keith reported in reply to the
> last report.

No idea what that previous report is. Care to share a link?

-- 
Ville Syrjälä
Intel

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

* Re: [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression
  2023-01-24  8:47   ` Ville Syrjälä
@ 2023-01-24 13:41     ` Christoph Hellwig
  2023-01-24 15:56       ` Keith Busch
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2023-01-24 13:41 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Christoph Hellwig, linux-kernel, linux-nvme, Keith Busch,
	Chaitanya Kulkarni, Gerd Bayer, Sagi Grimberg, Jens Axboe

On Tue, Jan 24, 2023 at 10:47:59AM +0200, Ville Syrjälä wrote:
> On Tue, Jan 24, 2023 at 07:21:40AM +0100, Christoph Hellwig wrote:
> > Err, no.  We're not going to randomly revert things.  If you want
> > to be productive check the one liner Keith reported in reply to the
> > last report.
> 
> No idea what that previous report is. Care to share a link?

https://lore.kernel.org/linux-nvme/849c43bc-7488-72a6-f6fc-8700639b0c79@leemhuis.info/T/#m759092f541ea29fcb41911890307e70868636a45

Patch to test:

https://lore.kernel.org/linux-nvme/849c43bc-7488-72a6-f6fc-8700639b0c79@leemhuis.info/T/#md13c22b29cd81bd0ce9167c271c582005ba30550

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

* Re: [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression
  2023-01-24 13:41     ` Christoph Hellwig
@ 2023-01-24 15:56       ` Keith Busch
  2023-01-24 17:12         ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Busch @ 2023-01-24 15:56 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Ville Syrjälä,
	linux-kernel, linux-nvme, Chaitanya Kulkarni, Gerd Bayer,
	Sagi Grimberg, Jens Axboe

On Tue, Jan 24, 2023 at 02:41:34PM +0100, Christoph Hellwig wrote:
> On Tue, Jan 24, 2023 at 10:47:59AM +0200, Ville Syrjälä wrote:
> > On Tue, Jan 24, 2023 at 07:21:40AM +0100, Christoph Hellwig wrote:
> > > Err, no.  We're not going to randomly revert things.  If you want
> > > to be productive check the one liner Keith reported in reply to the
> > > last report.
> > 
> > No idea what that previous report is. Care to share a link?
> 
> https://lore.kernel.org/linux-nvme/849c43bc-7488-72a6-f6fc-8700639b0c79@leemhuis.info/T/#m759092f541ea29fcb41911890307e70868636a45
> 
> Patch to test:
> 
> https://lore.kernel.org/linux-nvme/849c43bc-7488-72a6-f6fc-8700639b0c79@leemhuis.info/T/#md13c22b29cd81bd0ce9167c271c582005ba30550

I'll post the official patch if someone can let me know if it's
successful. Or I can potentially setup a VM to verify myself, but I
probably won't be able to get to that till next week.

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

* Re: [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression
  2023-01-24 15:56       ` Keith Busch
@ 2023-01-24 17:12         ` Ville Syrjälä
  0 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjälä @ 2023-01-24 17:12 UTC (permalink / raw)
  To: Keith Busch
  Cc: Christoph Hellwig, linux-kernel, linux-nvme, Chaitanya Kulkarni,
	Gerd Bayer, Sagi Grimberg, Jens Axboe

On Tue, Jan 24, 2023 at 08:56:30AM -0700, Keith Busch wrote:
> On Tue, Jan 24, 2023 at 02:41:34PM +0100, Christoph Hellwig wrote:
> > On Tue, Jan 24, 2023 at 10:47:59AM +0200, Ville Syrjälä wrote:
> > > On Tue, Jan 24, 2023 at 07:21:40AM +0100, Christoph Hellwig wrote:
> > > > Err, no.  We're not going to randomly revert things.  If you want
> > > > to be productive check the one liner Keith reported in reply to the
> > > > last report.
> > > 
> > > No idea what that previous report is. Care to share a link?
> > 
> > https://lore.kernel.org/linux-nvme/849c43bc-7488-72a6-f6fc-8700639b0c79@leemhuis.info/T/#m759092f541ea29fcb41911890307e70868636a45
> > 
> > Patch to test:
> > 
> > https://lore.kernel.org/linux-nvme/849c43bc-7488-72a6-f6fc-8700639b0c79@leemhuis.info/T/#md13c22b29cd81bd0ce9167c271c582005ba30550
> 
> I'll post the official patch if someone can let me know if it's
> successful. Or I can potentially setup a VM to verify myself, but I
> probably won't be able to get to that till next week.

Appears to work here. I threw a tested-by to the original thread.

-- 
Ville Syrjälä
Intel

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

end of thread, other threads:[~2023-01-24 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24  0:45 [PATCH] nvme-pci: Switch back to sync probe to fix rootfs mount regression Ville Syrjala
2023-01-24  6:21 ` Christoph Hellwig
2023-01-24  8:47   ` Ville Syrjälä
2023-01-24 13:41     ` Christoph Hellwig
2023-01-24 15:56       ` Keith Busch
2023-01-24 17:12         ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).