summaryrefslogtreecommitdiffstats
path: root/src/ioq.c
Commit message (Collapse)AuthorAgeFilesLines
* ioq: Submit and pop requests in batchesTavian Barnes2024-12-031-17/+32
| | | | | The new ioq_submit() function is now necessary to call to ensure the pending request batch is flushed.
* ioq: Add more io_uring setup flagsTavian Barnes2024-12-031-20/+55
|
* ioq: Refactor io_uring submission logicTavian Barnes2024-12-031-94/+145
|
* ioq: Use ioq_batch for both pushing and poppingTavian Barnes2024-12-031-47/+84
|
* ioq: Add a hash function between slots and monitorsTavian Barnes2024-12-031-1/+11
| | | | | | This helps avoid situations where multiple waiters block on different slots using the same monitor, which happened more often than expected due to correlations caused by batching.
* ioq: Prefetch pointers before popping themTavian Barnes2024-12-031-0/+8
| | | | | Also, cache-align struct ioq_ent to avoid false sharing when two workers are handling neighbouring requests.
* ioq: Add an ioq_nop() operation for benchmarkingTavian Barnes2024-12-021-0/+28
|
* ioq: Set the worker thread names to ioq-%dTavian Barnes2024-11-271-2/+8
|
* ioq: Enable IORING_SETUP_SUBMIT_ALLTavian Barnes2024-11-201-2/+18
|
* ioq: Check for io_uring_register_iowq_max_workers() before using itTavian Barnes2024-11-111-0/+3
| | | | | | | This allows us to build against liburing as old as version 2.0, which is apparently shipped by the latest Amazon Linux distribution. Fixes: https://github.com/tavianator/bfs/issues/147
* build: Move feature test macros to prelude.hTavian Barnes2024-08-281-1/+0
| | | | | | This replaces the explicit CPPFLAGS list in flags.mk with just `-include src/prelude.h`, shortening our compiler command lines and allowing them to be easily documented.
* prelude: Split bfs-specific utilities into new bfs.h headerTavian Barnes2024-08-281-0/+3
|
* diag: Get rid of bfs_static_assert()Tavian Barnes2024-08-281-2/+1
| | | | | In most cases, it's not too annoying to specify a message. For tests/bit.c, we can manually polyfill the 1-argument version.
* prelude: Simplify attributesTavian Barnes2024-07-281-2/+2
|
* ioq: Do more in the branch-free slot helperTavian Barnes2024-06-201-11/+11
|
* configure: Use --with/--without for librariesTavian Barnes2024-05-241-13/+13
|
* ioq: Fix uninitialized values in ioq_create() cleanup pathTavian Barnes2024-04-241-4/+1
| | | | | | | | I switched from ZALLOC_FLEX() to ALLOC_FLEX() in hopes that msan would catch uninitialized values in ioq_thread_create(), but in doing so, forgot to initialize all fields before the first goto fail. Fixes: f64f76b ("ioq: Copy ring_ops from the previous thread")
* Rename config.h to prelude.hTavian Barnes2024-04-191-1/+1
|
* ioq: Fix some allocation failure pathsTavian Barnes2024-03-201-2/+4
|
* Re-run include-what-you-useTavian Barnes2024-03-111-2/+3
|
* ioq: Copy ring_ops from the previous threadTavian Barnes2024-03-061-1/+4
| | | | | | Otherwise threads 2-N won't use io_uring at all! Oops. Fixes: 8bc72d6c ("ioq: Probe for supported io_uring operations")
* ioq: Probe for supported io_uring operationsTavian Barnes2024-02-281-18/+67
|
* ioq: Remove some branches from ioq_slot_{push,pop}()Tavian Barnes2024-02-181-12/+21
|
* ioq: Ensure ioq_ent is sufficiently alignedTavian Barnes2024-02-161-1/+1
| | | | | | | The natural alignment of struct ioq_ent is only 2 on m68k, so over-align it to at least 4 bytes on all platforms. Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=m68k&ver=3.1-1&stamp=1707699583
* ioq: Add batched ioqq_push/pop operationsTavian Barnes2024-02-151-49/+127
|
* ioq: Don't push immediately in ioq_check_cancel()Tavian Barnes2024-02-151-10/+6
|
* ioq: Add a missing close() if bfs_opendir() failsTavian Barnes2024-02-151-0/+2
|
* ioq: Don't use the symbolic IO_WQ_[UN]BOUND indicesTavian Barnes2024-02-141-2/+2
| | | | They are only available since liburing 2.2, which is newer than CI.
* ioq: Factor out io_uring initializationTavian Barnes2024-02-141-37/+73
|
* ioq: Make -j also limit the io_uring worker threadsTavian Barnes2024-02-141-0/+9
|
* ioq: Replay IOQ_STOP messages rather than spam themTavian Barnes2024-02-141-4/+5
|
* ioq: Get rid of IOQ_STRIDETavian Barnes2024-02-121-20/+5
| | | | Benchmarks show it hurts more than it helps.
* ioq: Shrink the io_uringsTavian Barnes2024-02-121-4/+2
|
* ioq: Implement ioq_stat()Tavian Barnes2024-01-181-10/+90
|
* ioq: Refactor to take advantage of -WswitchTavian Barnes2024-01-181-71/+91
|
* ioq: Use the negative errno conventionTavian Barnes2024-01-131-21/+11
|
* config: New variadic attr(...) macroTavian Barnes2023-12-181-2/+2
|
* ioq: Don't crash on allocation failuresTavian Barnes2023-11-151-0/+4
|
* config: New attr_noinline and attr_cold macrosTavian Barnes2023-11-091-0/+2
|
* ioq: Implement a better non-blocking popTavian Barnes2023-11-091-90/+186
|
* dir: Add a flags parameter to bfs_opendir()Tavian Barnes2023-10-171-3/+4
|
* ioq: Use io_uringTavian Barnes2023-10-021-37/+270
| | | | Closes #65.
* Formatting fixesTavian Barnes2023-09-271-1/+1
|
* ioq: New ioq_slot_monitor() helperTavian Barnes2023-08-231-4/+8
|
* ioq: Try harder to avoid setting IOQ_BLOCKEDTavian Barnes2023-07-121-6/+16
|
* ioq: Separate slot and queue operationsTavian Barnes2023-07-111-49/+75
|
* ioq: Implement async close() and closedir()Tavian Barnes2023-07-101-72/+103
|
* ioq: New ioq_capacity() functionTavian Barnes2023-07-061-2/+7
|
* ioq: Don't write to an empty slot in ioqq_trypop()Tavian Barnes2023-07-041-6/+10
|
* thread: Wrap more pthread APIsTavian Barnes2023-06-261-6/+3
|