summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* bfstd: Fix nproc() on systems without dynamically sized CPU masksTavian Barnes2025-03-101-2/+14
| | | | Notes: Fixes: a36774b ("bfstd: Take sched_getaffinity() into account in nproc()")
* diag: Don't leave unused assertion messages in the binaryTavian Barnes2025-03-041-6/+19
| | | | | Rather than hiding them with %.0s, use a ternary to replace them with an empty string if they would be unused.
* diag: Get rid of struct bfs_locationTavian Barnes2025-03-042-51/+40
| | | | | | | | Just add the standard prefix to the passed format string in the diagnostic macros themselves. This lets us write the whole message with one dprintf() call, minimizing interleaving. It's also a net win for binary size.
* bfstd: Take sched_getaffinity() into account in nproc()Tavian Barnes2025-02-271-5/+48
|
* bfstd: New nproc() functionTavian Barnes2025-02-273-15/+21
|
* Micro-optimize word-at-a-time loop tailsTavian Barnes2025-02-212-10/+14
| | | | | | Compilers apparently aren't smart enough to infer that the odd tail length fixup "loops" run at most once, and could be converted to ifs, so do that manually.
* ioq: Fix typo in commentTavian Barnes2025-02-181-1/+1
|
* trie: Use load8_beu*() for trie_mismatch()Tavian Barnes2025-02-131-29/+23
|
* bfstd: Use load8_leu*() for asciinlen()Tavian Barnes2025-02-131-24/+20
|
* bit: Add the load8_[bl]euN() utilitiesTavian Barnes2025-02-131-1/+53
|
* trie: Make nibble indices big-endianTavian Barnes2025-02-131-7/+7
| | | | Otherwise the order doesn't match lexicographical order on bytes.
* trie: New trie_node_size() helperTavian Barnes2025-02-131-3/+9
|
* trie: Clean up some bounds checkingTavian Barnes2025-02-121-6/+6
|
* trie: Micro-optimize trie_representative()Tavian Barnes2025-02-111-4/+5
| | | | | popcount(map & (bit - 1) & mask) has a longer critical path than popcount(map & (bit - 1)) & mask.
* eval: Don't error out in -ls if the time overflowsTavian Barnes2025-02-071-19/+30
|
* ioq: Use getppid() for the heavy NOP syscallTavian Barnes2025-02-061-1/+1
| | | | | | | | getpid() could hypothetically be cached (and glibc used to do it). getppid() can't be, because the parent could die and reparent the child to init. Link: https://lore.kernel.org/linux-mm/Z58dIOGlJ3grsAge@casper.infradead.org/
* mtab: Use mount IDs instead of dev_t for bfs_fstype()Tavian Barnes2025-02-061-2/+2
| | | | | | | | | This fixes -fstype on btrfs subvolumes, which previously reported "unknown" due to their dev_t being potentially different from the mount point. Link: https://savannah.gnu.org/bugs/?50859 Link: https://lwn.net/Articles/866582/
* stat: Expose mount IDs from statx()Tavian Barnes2025-02-063-2/+40
|
* trie: New trie_{get,set}_{str,mem}() functionsTavian Barnes2025-02-064-23/+93
|
* diag: Try to make diagnostics signal-saferTavian Barnes2025-02-061-3/+16
| | | | Link: https://sourceware.org/bugzilla/show_bug.cgi?id=16060
* ioq: Rewrite the spin loop to avoid a warningTavian Barnes2025-02-031-4/+3
| | | | | | | | | | | | With some GCC versions, --enable-ubsan leads to this warning: src/ioq.c: In function ‘ioq_slot_wait’: src/ioq.c:287:17: warning: ignoring loop annotation 287 | for (int j = 0; j < (1 << i); ++j) { | ^~~ presumably due to UBSan rewriting the shift to check for overflow. Work around this by precomputing the iteration count.
* sighook: Fix sigreset() error handlingTavian Barnes2025-01-201-9/+16
| | | | Notes: Fixes: 62928dd ("sighook: New sigreset() function to reset all handlers")
* sighook: Don't forget to check `initialized` in sigreset()Tavian Barnes2025-01-181-0/+4
|
* sighook: Fix up siginit() error pathsTavian Barnes2025-01-181-8/+14
|
* xspawn: Unblock signals between fork() and exec()Tavian Barnes2025-01-181-2/+15
| | | | | | Otherwise the child process runs with all signals blocked. Fixes: 423cfa4 ("xspawn: Mask signals before fork()")
* sighook: New sigreset() function to reset all handlersTavian Barnes2025-01-182-3/+45
|
* sighook: Convert siglist to a more general rcu_list typeTavian Barnes2025-01-181-52/+66
|
* build: Feature-detect #pragma nounroll supportTavian Barnes2025-01-171-2/+2
|
* list: Don't use leading underscores for globalsTavian Barnes2025-01-161-6/+6
| | | | Notes: Fixes: 90791fc ("list: Make SLIST_REMOVE() more type-safe")
* ioq: Don't unroll the spin loopTavian Barnes2025-01-162-1/+15
|
* ioq: Prefetch slots with a write intentTavian Barnes2025-01-161-1/+1
|
* build: Check for compound literal storage-class supportTavian Barnes2025-01-071-1/+1
| | | | This lets us use them on GCC >= 13, even before C23.
* sighook: Add some missing fatal signalsTavian Barnes2024-12-241-5/+14
|
* sighook: Preserve the exact siginfo_t in reraise() on LinuxTavian Barnes2024-12-241-3/+16
| | | | Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=66dd34ad31e5963d72a700ec3f2449291d322921
* sighook: Always re-raise faults on macOSTavian Barnes2024-12-221-0/+7
| | | | | | | | | | macOS always fills in si_code for SIG{BUS,ILL,SEGV} as if it were a real hardware fault, so returning from the handler is not guaranteed to re- trigger the signal. Fixes: aecdabb ("sighook: Return instead of re-raising for faults") Link: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2386463/4/util/posix/signals_test.cc Link: https://github.com/chromium/crashpad/commit/e0d8a0aa01ac176804077f1f128ccc894c098f79
* sanity: New sanitize_resize() functionTavian Barnes2024-12-162-16/+33
| | | | | This wraps __sanitizer_annotate_contiguous_container() to give byte-precise tracking of usable allocation sizes with ASan.
* sanity: Get rid of sanitize_ignore()Tavian Barnes2024-12-162-11/+6
| | | | | It's probably nicer to avoid evaluating expensive arguments when not sanitizing, rather than relying on the optimizer to clean them up.
* ioq: Refactor ioq_ring_probe_flags()Tavian Barnes2024-12-041-11/+13
|
* ioq: Try spinning before blocking in ioq_slot_wait()Tavian Barnes2024-12-031-1/+17
|
* ioq: Submit and pop requests in batchesTavian Barnes2024-12-033-17/+42
| | | | | 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-032-8/+10
| | | | | 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-023-0/+62
|
* xtime: New timespec utility functionsTavian Barnes2024-12-023-23/+95
|
* sighook: New SH_ONESHOT flagTavian Barnes2024-12-022-1/+21
|
* bfstd: Add more strto*() wrappersTavian Barnes2024-12-022-24/+69
|
* ioq: Set the worker thread names to ioq-%dTavian Barnes2024-11-271-2/+8
|