summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-08*: update copyright notices to encompass 2022HEADmasterVito Caputo
Mechanical change, not that there's been any significant changes in 2022 yet.
2022-03-08iou: s/entries/n_entries/ in iou_resize()Vito Caputo
Mechanical rename for clarity and consistency sake
2022-03-08iou: update stale iou_op_new() commentVito Caputo
At one time the cqe pointer was placed in the op, but at some point the cqe became "seen" before calling op->cb() to make the cqe available while op->cb() executed. None of my existing code required more than the result code which is already copied into iou_op_t by this point, so the cqe wasn't needed.
2021-08-28iou: give async worker threads a nameVito Caputo
Make them more easily identifiable in monitoring/profiling tools
2021-08-24iou: try consume CQEs in batchesVito Caputo
The code has been basically in the same "let's get io_uring working" form since libiou was first written. Looking more at the uring API, there's a non-waiting batched CQE consumer. If enough SQEs are outstanding and being processed fast enough, this could net a big efficiency gain. Currently just using a max batch size of 16 which seemd like a reasonable upper bound of operations to potentially grind on before revisiting sqe flushing and async completions.
2021-08-24iou: don't loop until n_async depletesVito Caputo
This wasn't right, if there's actually a backlog of async jobs this could hold up progress for non-async completions for no good reason. Just do completions for whatever is present in the processed list, don't potentially wait.
2021-08-24iou: introduce iou_async() for threadingVito Caputo
This is a preliminary implementaion of an iou-abstracted thread pool. Two callbacks are provided to iou_async(): async_cb: Called by a worker thread and must be carefully written for concurrent execution. completion_cb: Called by iou_run() after a thread has finished with async_cb(). As completion_cb() is called in the iou_run() context, assuming the caller is always entering iou_run() from the main thread, it may be viewed as a continuation point for the async work reentering the serial execution flow. At this time every iou_new() will create two worker threads. In the future it may just create a thread per core or something like that.
2021-08-16iou: allocate ops in exponentially growing chunksVito Caputo
and keep them around on free lists, ops only get actually freed in iou_free() now. trivial optimization, but thunk.h needs similar love before any libiou-heavy program using thunk.h as-is won't have profiles dominated by malloc/free overheads.
2021-08-15iou: cosmetic mechanical rename s/new/_op/Vito Caputo
trivial cleanup to make naming a bit more consistent
2021-08-15iou: add iou_ring() iou->ring accessorVito Caputo
To enable direct use of more liburing helpers, we need to make the ring struct available to external callers. The immediate impetus for adding this is registering files...
2020-11-07autotools: setup rudimentary build systemVito Caputo
This is arguably overkill for such a small .a, but it's convenient for embedding in other autotools projects.
2020-11-07iou: initial commitVito Caputo
This implements a barebones IO-oriented callback scheduler built atop the new kernel io-uring interface via liburing. There's not much going on here. The caller must still use liburing for preparing the SQEs in iou_op_t operations allocated via iou_op_new(), but that's basically all that's needed from liburing.
© All Rights Reserved