HomeFreeBSD

Replace usage of schedule_timeout with schedule_timeout_interruptible (#16150)

Description

Replace usage of schedule_timeout with schedule_timeout_interruptible (#16150)

This commit replaces current usages of schedule_timeout() with
schedule_timeout_interruptible() in code paths that expect the running
task to sleep for a short period of time. When schedule_timeout() is
called without previously calling set_current_state(), the running
task never sleeps because the task state remains in TASK_RUNNING.

By calling schedule_timeout_interruptible() to set the task state to
TASK_INTERRUPTIBLE before calling schedule_timeout() we achieve the
intended/desired behavior of putting the task to sleep for the
specified timeout.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Daniel Perry <dtperry@amazon.com>
Closes #16150

Details

Provenance
Daniel Perry <dtperry@amazon.com>Authored on May 9 2024, 2:30 PM
GitHub <noreply@github.com>Committed on May 9 2024, 2:30 PM
Parents
rG04bae5ec95f7: Disable high priority ZIO threads on FreeBSD and Linux
Branches
Unknown
Tags
Unknown

Event Timeline