On 8/20/26 01:09, Christian Brauner wrote:
> Make use of COREDUMP_SPARSE. Refuse it without COREDUMP_RECORDS.
> 
> Actual holes are sent as a record with length indicating how much zero
> data there was.
> 
> coredump_write() flushes a trailing hole if the coredump is done.
> Instead of writing the actual byte for pipes and sockets, collapse it.
> This stops wasting a header with coredump records for a single byte. So
> we now only write it when the coredump can be seeked. TL;DR a trailing
> hole is a zero record like any other and the records still cover the
> whole coredump.
> 
> Signed-off-by: Christian Brauner (Amutable) <[email protected]>
> ---

I don't have a lot to add, the general idea LGTM.

What might still be suboptimal is that, for large sparse ranges, we'll do a

        get_dump_page()

for each and every possible page in the range.

It would be interesting to benchmark how much that still costs on large sparse
memory areas (say, a handful of GiB large).

-- 
Cheers,

David

Reply via email to