opnsense-src/sys/dev/nvme
Warner Losh 83581511d9 nvme: Use adaptive spinning when polling for completion or state change
We only use nvme_completion_poll in the initialization path. The
commands they queue and wait for finish quickly as they involve no I/O
to the drive's media. These command take about 20-200 microsecnds
each. Set the wait time to 1us and then increase it by 1.5 each
successive iteration (max 1ms). This reduces initialization time by
80ms in cpervica's tests.

Use this same technique waiting for RDY state transitions. This saves
another 20ms. In total we're down from ~330ms to ~2ms.

Tested by:		cperciva
Sponsored by:		Netflix
Reviewed by:		mav
Differential Review:	https://reviews.freebsd.org/D32259
2021-10-01 19:17:55 -06:00
..
nvme.c nvme: use config_intrhook_drain to avoid removable card races 2021-03-11 09:45:10 -07:00
nvme.h nvme: Fix alignment on nvme structures 2021-07-02 16:05:19 -06:00
nvme_ahci.c nvme(4): Add MSI and single MSI-X support. 2021-08-31 13:45:46 -04:00
nvme_ctrlr.c nvme: Use adaptive spinning when polling for completion or state change 2021-10-01 19:17:55 -06:00
nvme_ctrlr_cmd.c Add Host Memory Buffer support to nvme(4). 2020-01-07 21:17:11 +00:00
nvme_ns.c nvme(4): Report NPWA before NPWG as stripesize. 2021-07-05 23:13:15 -04:00
nvme_ns_cmd.c Add a brief comment explaining why we can return ETIMEDOUT from the call to the 2019-09-02 17:10:46 +00:00
nvme_pci.c nvme(4): Add MSI and single MSI-X support. 2021-08-31 13:45:46 -04:00
nvme_private.h nvme: Use adaptive spinning when polling for completion or state change 2021-10-01 19:17:55 -06:00
nvme_qpair.c nvme: Sanity check completion id 2021-09-28 21:21:50 -06:00
nvme_sim.c nvme/nda: Fail all nvme I/Os after controller fails 2021-09-17 16:09:21 -06:00
nvme_sysctl.c nvme: count number of ignored interrupts 2021-09-28 21:18:00 -06:00
nvme_test.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00
nvme_util.c nvme: clean up empty lines in .c and .h files 2020-09-01 22:03:10 +00:00