Check for the unutilized credit and use them before the pacer period and within the threshold limit #37
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.
Effective checking on the available credit
Root Cause:
As of now credit availability is checked only after the pacer period expiry. Hence in case if there is left our credit available will not be consumed till the next pacer period. This will cause unnecessary holding of the request till the next pacer period.
Fix info:
Added the Function is_credit_available() to check the credit available before expiry of the pacer period.
This is to consume available credit if not consumed during the previous pacer period based on the threshold limit.
(1) Added below macros to configure the credit checking
/*
*/
(2) Added the below macros to configure the tuner instead of hardcoded values:
[Features/Functional areas and/or component interfaces affected]
Request submission within the pacer period
[Whether the change affects how hardware is programmed]
Yes - Will not hold the request if the credit available within the pacer period.
Local testing
Performed the testing with SPDK_NVMF_RDMA_IO_PACER_CHECK_CREDITS_ONLY_AT_PACER_PERIOD turned to '0' and below are the results.