-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Update latency_measure benchmark test for userspace #63636
Update latency_measure benchmark test for userspace #63636
Conversation
9e4da31
to
d1ae26c
Compare
d1ae26c
to
1f250fd
Compare
400361b
1f250fd
to
400361b
Compare
This latest push modified the prj.conf and prj_user.conf files to minimize the number of timer interrupts. If the system supports a tickless kernel, it will be used automiatically; if not, then it falls back to the minimum number of system ticks per second. |
Hmm ... when the twister tests fail on the user space version of the latency_measure test, it seems to be failing in one of two ways ...
I am not able to reproduce either case locally (even after updating to the 0.16.3. SDK) |
400361b
to
a8b1000
Compare
# configurations on platforms that support user space. | ||
benchmark.user.latency: | ||
filter: CONFIG_ARCH_HAS_USERSPACE | ||
slow: true |
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.
how slow is this? slow means it will almost never run as part of CI, and we do not want that.
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.
Locally, this test passes in very reasonable amount of time on my development box. However, I have been finding that when executed as part of CI, the user thread configuration has been consistently failing every platform. Those failures can be divided into two categories: timeout and unexpected eof. For both of these categories, CI indicates that the test is taking about 60 seconds. In the timeout case, the test will get to various points depending upon the platform, but for some of the cases it appears to be 25% of the way through.
Please correct me if I have misunderstood the use of the slow field. It was my understanding that this will not prevent it from nightly runs, but it will prevent it from regular CI. I was thinking, perhaps incorrectly, that the benefits of executing a benchmark test as part of every CI would be minimal, and that it would be something that would be better targeted for nightly testing. That being said, I have no problem dropping the slow field if there is a preference for it to be part of the regular CI.
a8b1000
to
b28de08
Compare
Updates both the preemptive and cooperative thread context switch benchmark tests so that not only will they share the same infrastructure, but they can both get the context switch times when switching from ... 1. Kernel thread to kernel thread 2. Kernel thread to user thread 3. User thread to kernel thread 4. User thread to user thread Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates the interrupt to thread benchmark tests to address a number of items. 1. Updates descriptions to correctly indicate that it is not interrupt latency being measured, but the time to leave the interrupt and return to a thread. 2. Repeats the test numerous times instead of just once to get an average. 3. Overhead from obtaining timestamps is now accounted for. 4. Adds support for returning to a user thread. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Update the thread ops (create/start/suspend/resume/abort) to include support for userspace. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates the semaphore benchmarking in the latency_benchmark code to support user threads. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Updates the mutex benchmark tests to support user threads. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Many architectures and platforms can not directly read a timestamp from userspace as the relevant MMIO registers are inaccessible. This necessitates that the timestamp be obtained by a system call. The additional overhead from these system calls can be taken into account and the recorded times adjusted depending upon whether the test occurred entirely within kernel space, entirely within user space, or a mix between the two. It is worth noting that when the test requires a mix of both user and kernel space threads, the overhead is estimated as the mean average of purely kernel threads and purely user threads overhead times. This might not be technically correct, but it ought to provide a reasonable enough approximation. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Adds userspace configuration to testcase.yaml. Updates the README.rst with output from runs on a frdm_k64f board as not only have the descriptions changed, but there is now additional output for userspace configurations. Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
b28de08
to
2167774
Compare
Rebased to resolve merge conflicts. |
This set of commits updates the latency measure benchmark test to add support for user space.
Where possible, results are provided for operations performed from both kernel and user threads.