-----Original Message----- From: Gerd Hoffmann firstname.lastname@example.org Sent: 21 July 2021 15:57 To: Thanos Makatos email@example.com Cc: firstname.lastname@example.org; Thanos Makatos email@example.com Subject: Re: [PATCH] nvme: don't keep probing namespaces after an active one has been found
On Thu, Jul 01, 2021 at 02:20:47PM +0000, Thanos Makatos wrote:
From: Thanos Makatos firstname.lastname@example.org
The current implementation keeps probing NVMe namespaces even if an active one has been found. This is unnecessary and most importantly results in memory allocation failure if the are more than a few dozens of nmespaces. Also, not probing the remaining namespaces after having found an active one reduces boot time.
[ just back from vacation ]
Well, assuming the first namespace is the one you want actually boot from. Which I expect is the common case, but who knows how people use their machines ...
IIRC there is some work in progress to add bootorder support for namespaces, where do we stand with that?
IIUC I got the go-ahead to implement this in QEMU, so let's see how that goes. Then we can look at the SeaBIOS patch I suppose.
Once we have this we should be able to extend the skip_nonbootable logic to handle not only controllers but also namespaces. With that we should be able to initialize the correct boot namespaces instead of picking the first namespace.
I would expect that selecting a particular namespace (which will be enabled by the QEMU patch) will be optional. Therefore, we might still have to figure out from which namespace to boot from, so we'll be in the same situation as we are now (an NVMe controller with lots of namespaces). So, I think the patch I propose is still useful?