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

tests: latency_measure: Remove TICK_SYNCH() #67856

Conversation

peter-mitsis
Copy link
Collaborator

It has been observed that on some simulator platforms the TICK_SYNCH at the start of the ISR tests was acting as a bottle neck and leading the test to take an absurdly long time to execute. Removing this TICK_SYNCH() (which is a call to k_sleep(1 tick)) greatly speeds up the execution of this test on those platforms.

The ISR tests began with a call to TICK_SYNCH() which aligned the execution to the next tick boundary. The original aim of this was to prevent a rogue timer ISR from coming and interfering with the measurements. This used to be necessary as once upon a time that test only did a single iteration. However, it has since been updated to perform this measurement 10000 times. Consequently, should a rogue ISR be included in the measurement, it will be averaged out.

For example, if a rogue ISR of say 10 usec were to be included in a single measurement, its impact would be averaged down to 1 nsec, and that seems well within any expected experimental error.

It has been observed that on some simulator platforms the TICK_SYNCH
at the start of the ISR tests was acting as a bottle neck and leading
the test to take an absurdly long time to execute. Removing this
TICK_SYNCH() (which is a call to k_sleep(1 tick)) greatly speeds up
the execution of this test.

The ISR tests began with a call to TICK_SYNCH() which aligned the
execution to the next tick boundary. The original aim of this was
to prevent a rogue timer ISR from coming and interfering with the
measurements. This used to be necessary as once upon a time that
test only did a single iteration. However, it has since been
updated to perform this measurement 10000 times. Consequently,
should a rogue ISR be included in the measurement, it will be
averaged out.

For example, if a rogue ISR of say 10 usec were to be included
in a single measurement, its impact would be averaged down to
1 nsec, and that seems well within any expected experimental error.

Signed-off-by: Peter Mitsis <[email protected]>
@zephyrbot zephyrbot added Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. area: Benchmarks labels Jan 19, 2024
@zephyrbot zephyrbot requested review from dcpleung and nashif January 19, 2024 21:16
@henrikbrixandersen
Copy link
Member

@peter-mitsis Please have a look.

@nashif
Copy link
Member

nashif commented Mar 11, 2024

@peter-mitsis this can be closed, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Benchmarks Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants