Do not handle wakeup events if the event queue is not primed #260
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.
Onload stack in kernel for AF_XDP unnecessarlyy tries to handle events even when the event queue is not primed. This wastes cpu cycles and also introduces lock contention when we are running in spinning mode.
Return early and do not handle wakeup events if the event qeueue was not primed.
Latency before this change:
num_transactions=386341
latency_min=0.000013776
latency_max=0.200256189
latency_mean=0.000023243
latency_stddev=0.001065715
latency_p50=0.000015350
latency_p90=0.000021750
latency_p99=0.000023030
latency_p99.9=0.000024630
Latency after this change:
num_transactions=532948
latency_min=0.000013594
latency_max=0.199509553
latency_mean=0.000018712
latency_stddev=0.000943680
latency_p50=0.000014230
latency_p90=0.000014550
latency_p99=0.000015990
latency_p99.9=0.000017430