Page MenuHomeFreeBSD

linuxkpi: Only reset task state if non-indefinite timeout in `schedule_timeout()`
AbandonedPublic

Authored by dumbbell on Apr 19 2025, 2:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 28, 10:13 PM
Unknown Object (File)
Sat, Sep 27, 7:31 PM
Unknown Object (File)
Sat, Sep 27, 2:47 PM
Unknown Object (File)
Sep 16 2025, 8:23 AM
Unknown Object (File)
Sep 9 2025, 7:52 PM
Unknown Object (File)
Sep 7 2025, 12:56 AM
Unknown Object (File)
Sep 5 2025, 5:50 AM
Unknown Object (File)
Aug 5 2025, 9:31 AM
Subscribers

Details

Reviewers
markj
Group Reviewers
linuxkpi
Summary

On Linux, if there is no specified timeout (i.e., the timeout is set to MAX_SCHEDULE_TIMEOUT), the task state is left unchanged.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

On Linux, if there is no specified timeout (i.e., the timeout is set to MAX_SCHEDULE_TIMEOUT), the task state is left unchanged.

The herald comment for schedule_timeout() also states that the thread state is guaranteed to be TASK_RUNNING upon return. I'd assume that something in the scheduler resets the task state.

Is one of the drm drivers actually affected by this?

You are right, I misread the comment and code in Linux source code.

I didn’t spot any problem with DRM drivers, just thought there was an inconsistency compared to Linux. I will abandon this review.