Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ntco::IoRingSubmissionQueue: optimize the way 'push' works #78

Open
smtrfnv opened this issue Sep 7, 2023 · 0 comments
Open

ntco::IoRingSubmissionQueue: optimize the way 'push' works #78

smtrfnv opened this issue Sep 7, 2023 · 0 comments

Comments

@smtrfnv
Copy link
Contributor

smtrfnv commented Sep 7, 2023

Is your feature request related to a problem? Please describe.
When submission queue becomes full the driver automatically enters the ioring (ntco::IoRingUtil::enter) and waits for numToSubmit events to be submitted. My concern is that it submits exactly 1 entry less than it could.

Let's consider ntco_ioring.t TC1. See the log:
ntco_ioring.t_assertion.txt
Submission queue size is 4 entries. From the begining of the TC, entries are continuosly pushed (test->defer(id);) to the driver: ID0, 1, 2.....N.
When pushing item with ID 3, there are already 3 entries (ID0, ID1, ID2) in the submission queue. But it detects that it's full and enters the ioring (ntco::IoRingUtil::enter) with numToSubmit equals 3. From my perspective, that's a missed opportunity to submit all 4 entries.

Describe the solution you'd like
With respect to the example above, I think that IoRingSubmissionQueue::push should work differently:

  1. It should check if the submission queue is already full and enter the ioring (ntco::IoRingUtil::enter) if so, pushing all the items from the queue.
  2. Save new entry onto the queue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant