Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/setup: use correct sqe size for unmapping
For some reason only one path actually cares about the SQE size in io_uring_queue_exit(). Move the code into the generic case, and use the sqe_size variable for both cases. Otherwise it's unmapping less than what was mapped, if SQE128 is used. This can hold the fd pinned, and hence defer release of the ring until the task exits (or randomly unmaps the remaining range, which likely will never happen as liburing should've done that). Link: #1310 Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information
460c1b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, appreciate!!! It works fine for me now. This issue has been bothering me about one month.
460c1b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was definitely a funky one to figure out!
460c1b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just using the nvme passthrough way to send write/read/trim/flush command together. And also I need to have a high speed. So I try this way. At the beginning, I only use qd32 for test, but after I run stress test, the system always report a "Resources Temporary Unavailable" . Then I found this issue step by step to reduce my code. lol.
460c1b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good reproducer that's condensed down to the bare minimum makes any bug shallow and easy to fix. So greatly appreciated. I'll close the issue, thanks for the report.