nvme/pci: increase the init delay to 2s

The time required to wait increases with the amount of submitted
FLR resets. Now that DPDK takes less and less time to initialize,
this starts to become an issue. We can even see on our CI within
regular tests where a single application is start-stopped in
a short period of time. This is also a problem if a device is
detached via RPC and immediately attached afterwards.

The time required to wait seems to cap at 2 seconds, so instruct
our driver to wait exactly that.

Change-Id: I18b6fbdea9b0dca5d7e1756e9ead7d97119f2fa2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/429415
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Darek Stojaczyk 2018-10-15 06:56:23 +02:00 committed by Jim Harris
parent 951bb3a458
commit 0258728f2b

View File

@ -1883,8 +1883,8 @@ nvme_ctrlr_process_init(struct spdk_nvme_ctrlr *ctrlr)
*
* TODO: Figure out what is actually going wrong.
*/
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Adding 500 ms delay before initializing the controller\n");
ctrlr->sleep_timeout_tsc = spdk_get_ticks() + (500 * spdk_get_ticks_hz() / 1000);
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Adding 2 second delay before initializing the controller\n");
ctrlr->sleep_timeout_tsc = spdk_get_ticks() + (2000 * spdk_get_ticks_hz() / 1000);
break;
case NVME_CTRLR_STATE_INIT: