]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/doc/nvme/async_completion.md
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / spdk / doc / nvme / async_completion.md
1 # NVMe Asynchronous Completion {#nvme_async_completion}
2
3 The userspace NVMe driver follows an asynchronous polled model for
4 I/O completion.
5
6 # I/O commands {#nvme_async_io}
7
8 The application may submit I/O from one or more threads on one or more queue pairs
9 and must call spdk_nvme_qpair_process_completions()
10 for each queue pair that submitted I/O.
11
12 When the application calls spdk_nvme_qpair_process_completions(),
13 if the NVMe driver detects completed I/Os that were submitted on that queue,
14 it will invoke the registered callback function
15 for each I/O within the context of spdk_nvme_qpair_process_completions().
16
17 # Admin commands {#nvme_async_admin}
18
19 The application may submit admin commands from one or more threads
20 and must call spdk_nvme_ctrlr_process_admin_completions()
21 from at least one thread to receive admin command completions.
22 The thread that processes admin completions need not be the same thread that submitted the
23 admin commands.
24
25 When the application calls spdk_nvme_ctrlr_process_admin_completions(),
26 if the NVMe driver detects completed admin commands submitted from any thread,
27 it will invote the registered callback function
28 for each command within the context of spdk_nvme_ctrlr_process_admin_completions().
29
30 It is the application's responsibility to manage the order of submitted admin commands.
31 If certain admin commands must be submitted while no other commands are outstanding,
32 it is the application's responsibility to enforce this rule
33 using its own synchronization method.