Age | Commit message (Collapse) | Author |
|
This turns journal_t into a member of a new private _journal_t,
everything bufs-related resides in the outer _journal_t, and the
public journals API only passes around the journal_t member
pointer. The usual PIMPL in C paradigm; requires some
container_of() hoop-jumping in the journals.c code to compute the
private address from the public.
|
|
This adds eight 8KiB "fixed" buffers per opened journal,
recycled in a basic LRU fashion.
Any read 8KiB or smaller passes through this cache, simply
memcpy()d from the buffer when already resident, or upsized to an
8KiB read when absent, to then be memcpy()d out of the populated
buffer when the read into the buffer completes.
Any read larger than 8KiB bypasses the buffers to be read
directly into the provided destination via iou as if the cache
weren't present at all.
|
|
This is currently very hacky and unfinished, but does enough for
some performance comparisons against a zstd-using journalctl --verify
that has been hacked to return early after the first pass.
It's currently rather leaky, the whole per-object-dispatch thingy
is illuminating a thunk_h shortcoming and forcing addressing the
issue... soon.
|
|
This introduces an journal_t.idx member for "fixed" style usage
in io_uring parlance. Once all journals get opened, they're registered
in the underlying iou ring.
Subsequent operations on these files may supply these idx values
as the fd, but must also add IOSQE_FIXED_FILE to the sqe's flags.
This commit also switches the already present read operations to
use the idx/IOSQE_FIXED_FILE method.
Theoretically this should offer some efficiency gains, since the
kernel can now skip some per-operation fd handling overheads by
having them done once instead @ registration time.
|
|
Make naming a bit more descriptive and consistent...
journals_for_each() is a simple non-IO-incurring journals
array iteration, journal_for_each() generates IO and walks
the data objects hash table... they're quite different,
and shouldn't have such similar names.
|
|
This is a very quick and dirty experimental hack written in some
sort of bastard continuation-passing style in C w/io_uring using
journal-file introspection and manipulation duty as an excuse for
its existence.
Consider this unfinished prototype quality code.
|