Skip to content

iolog: free io_piece log on thread cleanup#2077

Merged
axboe merged 1 commit into
axboe:masterfrom
minwooim:ipo
Apr 7, 2026
Merged

iolog: free io_piece log on thread cleanup#2077
axboe merged 1 commit into
axboe:masterfrom
minwooim:ipo

Conversation

@minwooim
Copy link
Copy Markdown
Contributor

@minwooim minwooim commented Apr 7, 2026

prune_io_piece_log() is called only at the start of each loop iteration, so io_piece entries accumulated during the final do_io() run are never explicitly freed.

When fio runs as a process this goes unnoticed because the OS reclaims the heap on exit. When fio is embedded as a pthread, which is a use-case of unvme-cli, the parent process keeps running, so those allocations become a genuine memory leak proportional to the number of write IOs logged for verify.

prune_io_piece_log() is called only at the start of each loop iteration, so
io_piece entries accumulated during the final do_io() run are never explicitly
freed.

When fio runs as a process this goes unnoticed because the OS reclaims the heap
on exit. When fio is embedded as a pthread, which is a use-case of unvme-cli,
the parent process keeps running, so those allocations become a genuine
memory leak proportional to the number of write IOs logged for verify.

Signed-off-by: Haeun Kim <[email protected]>
Signed-off-by: Minwoo Im <[email protected]>
@axboe axboe merged commit 7f8ef2f into axboe:master Apr 7, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants