-
Notifications
You must be signed in to change notification settings - Fork 63
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
MCS: Add periodic drift test #76
base: master
Are you sure you want to change the base?
Conversation
If this test fails, TIMER_OVERHEAD_TICKS may not be set correctly for the platform. Needs seL4 pull #847 applied to pass. Signed-off-by: Indan Zupancic <[email protected]>
Without seL4/seL4#847 this fails with 2498 and 2494 for SMP instead of the expected 2500 on tqma8xqp1gb. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand this right, the main thread sleeps for (1 second - half-a-period = 1 - 0.000002s) which should guarantee that each of the child threads should be allowed to yield exactly (1 second / period = 2500) times. This means that if a period drifts by more than 80ns for each activation on average the test will fail, but if it's less than 80ns it will pass?
Correct. The test can be made less strict by reducing the sleep time. |
/* Create tasks with lower priority: */ | ||
for (int i = 0; i < num_threads; i++) { | ||
create_helper_thread(env, &t[i]); | ||
set_helper_priority(env, &t[i], env->priority - 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add an assert here that this does not cause a roll over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. test_timeout_fault_in_server
does OUR_PRIO - 2
, and #define OUR_PRIO (env->priority)
. It seems priority is set to seL4_MaxPrio - 1
in main.c.
@Indanz Could you add this as a comment that describes the test's details? |
If this test fails, TIMER_OVERHEAD_TICKS may not be set correctly
for the platform. Needs seL4 pull #847 applied to pass.
Signed-off-by: Indan Zupancic [email protected]