Skip to content

fio: fixes for io_submit_mode=offload stability - #2058

Merged
axboe merged 2 commits into
axboe:masterfrom
tomas-winkler-sndk:offload_stability
Feb 24, 2026
Merged

axboe merged 2 commits into
axboe:masterfrom
tomas-winkler-sndk:offload_stability

Conversation

@tomas-winkler-sndk

Copy link
Copy Markdown
Contributor

Fix Workqueue Stall: Propagates RAMP_FINISHING state from the parent thread to offload workers. This prevents workers from getting stuck in the ramp phase and hanging the process.

Fix Null Pointer Crash: Adds a check for thinktime_blocks_counter in reset_all_stats(). This prevents a crash when resetting statistics in offload mode where workers lack local counter allocation.

The thinktime_blocks_counter is only initialized and updated
at the thread level. However, reset_all_stats() is also called for
io_workers when offload mode is enabled.

Add a check to ensure thinktime_blocks_counter is allocated before
attempting to sum its values. This prevents a null pointer dereference
and subsequent crash in offload workers.

Signed-off-by: Tomas Winkler <tomas.winkler@sandisk.com>
@tomas-winkler-sndk

Copy link
Copy Markdown
Contributor Author

Any comments on this PR?

Comment thread time.c Resolved
@axboe

axboe commented Feb 23, 2026

Copy link
Copy Markdown
Owner

Looks fine, just a style issue highlighted.

In the ramp state is managed by a helper thread calling
ramp_period_check(). This helper thread advances the state
for the parent job thread_data, but when runnign io_submit_mode=offload
it does not have access to the private thread data of the individual
offload worker threads.

As a result, worker threads calling ramp_period_over() may remain stuck
in an old ramp state, never observing the transition to RAMP_FINISHING
or RAMP_DONE. This prevents the workers from properly transitioning to
the main workload and can cause fio to hang indefinitely instead of
reaching runtime completion.

Propagate the RAMP_FINISHING state from the parent thread_data to
the worker td within ramp_period_over().
This ensures that workers stay in sync with the state machine
managed by the helper thread.

Signed-off-by: Chana Zaks <chana.zaks@sandisk.com>
Signed-off-by: Tomas Winkler <tomas.winkler@sandisk.com>
@tomas-winkler-sndk

Copy link
Copy Markdown
Contributor Author

Looks like the CI has failed on a network issue, not related to the code change.

@axboe
axboe merged commit 411de8e into axboe:master Feb 24, 2026
16 of 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

⌂ 换网址