forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: RTIO 1-shot akm09918 implementation #9
Open
tristan-google
wants to merge
15
commits into
yperess:peress/sensors
Choose a base branch
from
tristan-google:rtio-akm09918
base: peress/sensors
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
WIP: RTIO 1-shot akm09918 implementation #9
tristan-google
wants to merge
15
commits into
yperess:peress/sensors
from
tristan-google:rtio-akm09918
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rather than the rings, which weren't shared between userspace and kernel space in Zephyr like they are in Linux with io_uring, use atomic mpsc queues for submission and completion queues. Most importantly this removes a potential head of line blocker in the submission queue as the sqe would be held until a task is completed. As additional bonuses this avoids some additional locks and restrictions about what can be submitted and where. It also removes the need for two executors as all chains/transactions are done concurrently. Lastly this opens up the possibility for a common pool of sqe's to allocate from potentially saving lots of memory. Signed-off-by: Tom Burdick <[email protected]>
Test throughput of submit and consume pair for rtio Signed-off-by: Tom Burdick <[email protected]>
On non-smp systems where multiple cores aren't in play atomics aren't really necessary and volatile can be used in stead. Additionally marks the push function as ALWAYS_INLINE as I saw at times it was not being inlined. MPSC operation speed is crucial to the performance of rtio, these changes provided a 30% throughput improvmement in the throughput test. Signed-off-by: Tom Burdick <[email protected]>
Reworks the zephyr macros and pools to be objects in their own right. Each pool can be statically defined with a Z_ private macro. The objects can then be initialized with an rtio instance statically. This cleans up a lot of code that was otherwise doing little bits of management around allocation/freeing and reduces the scope those functions has to the data it needs. This should enable sharing the pools of sqe, cqe, and mem blocks among rtio instances in a future improvement easily. Signed-off-by: Tom Burdick <[email protected]>
Add a memset to clear out the sqe prior to running any of the rtio_sqe_prep_* functions. Signed-off-by: Yuval Peress <[email protected]> topic#rtio_multishot
- Add a new API `rtio_sqe_cancel` to attempt canceling a queued SQE - Add a new syscall `rtio_sqe_copy_in_get_handles` which allows getting back the SQE handles generated by the copy_in operation so that they can be canceled. Signed-off-by: Yuval Peress <[email protected]> topic#rtio_multishot
- Introduce multishot reads which remain on the SQ until canceled Signed-off-by: Yuval Peress <[email protected]> topic#rtio_multishot
Add a new async API based on the RTIO subsystem. This new API allows: 1. Users to create sampling configs (telling the sensor which channels they want to sample together). 2. Sample data in an asynchronous manner which provides greater control over the data processing priority. 3. Fully backwards compatible API with no driver changes needed for functionality (they are needed to improve performance). 4. Helper functions for processing loop. Signed-off-by: Yuval Peress <[email protected]>
Update the sensor shell logic to use the new sensor_read() APIs Signed-off-by: Yuval Peress <[email protected]>
Once zephyrproject-rtos#57130 merges this will not be needed. Signed-off-by: Yuval Peress <[email protected]>
Signed-off-by: Yuval Peress <[email protected]>
yperess
force-pushed
the
peress/sensors
branch
15 times, most recently
from
May 18, 2023 14:34
aafcb9c
to
1dd06c2
Compare
yperess
force-pushed
the
peress/sensors
branch
3 times, most recently
from
June 6, 2023 02:26
cd5c2b2
to
0cebe93
Compare
yperess
force-pushed
the
peress/sensors
branch
3 times, most recently
from
June 27, 2023 07:15
c26fdc6
to
0a11578
Compare
yperess
force-pushed
the
peress/sensors
branch
2 times, most recently
from
July 11, 2023 08:05
3da09b0
to
0f77322
Compare
yperess
pushed a commit
that referenced
this pull request
Mar 14, 2024
D9/SCK pin is #9 pin, not #0. Signed-off-by: TOKITA Hiroshi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These can be squashed together before merging