Enhance async submission API#3421
Merged
Merged
Conversation
Collaborator
Author
|
It seems that many of the admin commands are working fine via io_uring but not all. e.g. Also some of the user IO tests fail nvme/029: also the 'id-ns' or 'id-ctrl' fails: overall, it looks like there are a bit more of details to be sorted out with the io_uring interface. |
Make the async passthru interface more useful by supporting different workflows: - Simple synchronous (one at a time): libnvme_exec_admin_passthru(hdl, &cmd); - Simple batching (submit multiple, wait for all): libnvme_submit_admin_passthru(hdl, &cmd1); libnvme_submit_admin_passthru(hdl, &cmd2); libnvme_wait_admin_passthru(hdl); - Full async control (submit and reap selectively): libnvme_submit_admin_passthru_async(hdl, &cmd1, cookie1); libnvme_submit_admin_passthru_async(hdl, &cmd2, cookie2); libnvme_reap_admin_passthru_async(hdl, &completion); Reverted the behavior of libnvme_submit_*_passthru() to always be synchronous. This forces the caller to explicitly handle the switch from async to sync logic. Explicit API behavior is more maintainable than implicit behavior. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Add tests cases for the async submission API. Since there is no easy way to tests async test, it only tests the fallback mode, when there is no io_uring. Signed-off-by: Daniel Wagner <wagi@kernel.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The async API is only all or nothing. Extend it so it's possible to submit and wait for individual commands.