Skip to content

io_uring Support #5

@qbacpey

Description

@qbacpey

TODO

API

  • io_uring_prep_xxx:
  • io_uring_submit:
  • io_uring_submit_and_wait:
  • io_uring_wait_cqe:
  • io_uring_peek_cqe:

Data Structure

  • unordered_map<struct io_uring *, struct io_uring_sqe *> (requests_to_submit): Track the requests to be submitted. Key is the io_uring obj this request belongs to, value is the struct io_uring_sqe * of the requests that used as arguments of io_uring_sqe_set_data.
  • unordered_map<struct io_uring *, unordered_map<__u64, Enum::RequestQueue>> (ongoing_requests): Track the submitted requests.
    • When liburing waiting function (e.g. io_uring_wait_cqe) is called, TMIO would mark all the prending requests for this struct io_uring as "required finsihed". Also would mark the request pointed by struct io_uring_cqe **cqe_ptr as finsihed (might use the io_uring_cqe_get_data for doing this in a clever ways).
    • When liburing checking function (e.g. io_uring_cqe_get_data) is called, TMIO would mark the related request as "actually finished".

Helper Thread

Because the reap API all inplement with static inline, not able to intercept them with LD_PRELOAD, consider use a helper thread to do this.

Can have a std::async helper thread to maintain the data strucutre of TMIO, the best interveal can be approach by check how many io_uring have their complemntion request not checking.

Testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions