Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCHED0021: decrease chances of a race condition #105

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

lsf37
Copy link
Member

@lsf37 lsf37 commented Oct 27, 2023

Decrease the chance that the monitor thread is preempted just when it has released the preemption threads, but before it has yielded itself. (If that happens, the preemption threads get two time slices.)

See also #42 -- the implementation here is basically @axel-h's suggestion from that issue.

We believe we might have seen an instance of this in one test run (of many) for PR seL4/seL4#968

Decrease the chance that the monitor thread is preempted just when it
has released the preemption threads, but before it has yielded itself.
(If that happens, the preemption threads get two time slices.)

See also #42

Signed-off-by: Gerwin Klein <[email protected]>
@lsf37 lsf37 requested review from axel-h and Indanz October 27, 2023 01:36
@lsf37 lsf37 self-assigned this Oct 27, 2023
@lsf37 lsf37 added the hw-test set to run sel4test hardware test for this PR label Oct 27, 2023
@lsf37 lsf37 linked an issue Oct 27, 2023 that may be closed by this pull request
@lsf37
Copy link
Member Author

lsf37 commented Oct 27, 2023

After this is merged, I might try enabling this test for simulation again in a separate PR to see if it got any better. Although I don't really think it was this specific race condition that was the reason for failure there.

@Indanz
Copy link
Contributor

Indanz commented Oct 27, 2023

This should be enough to make it robust. If time_now() can't run within one time slice, there's something horribly wrong.

Copy link
Member

@axel-h axel-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Indanz Indanz merged commit e7d9607 into master Oct 27, 2023
57 checks passed
@Indanz Indanz deleted the lsf37/sched0021 branch October 27, 2023 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hw-test set to run sel4test hardware test for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test SCHED0021 has a race condition
3 participants