On 17/11/2026 17:09, Pádraig Brady wrote:
On 17/11/2026 16:55, Collin Funk wrote:
Would it be better to place the small buffer on the stack and over
allocate slightly so it could be aligned? Or perhaps that is overkill...
Oh right. I was playing around with retries and fallback,
but without that we could indeed allocate an 8KiB stack buffer
and ptr_align() to a 4KiB aligned region within that.
I'll have a look.

The stack is faster, though not measurably as the heap buffer
is reused for multiple files.  I kept the existing heap buffer
for the minor benefit of keeping the I/O page aligned
in case that had some variation with direct I/O somewhere.

I've pushed this now at:
https://github.com/coreutils/coreutils/commit/75e1b68c6

cheers,
Padraig

Reply via email to