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

RTIO: Add Workqueue support for delayed work items #77100

Open
ubieda opened this issue Aug 14, 2024 · 6 comments
Open

RTIO: Add Workqueue support for delayed work items #77100

ubieda opened this issue Aug 14, 2024 · 6 comments
Assignees
Labels
area: RTIO Enhancement Changes/Updates/Additions to existing features
Milestone

Comments

@ubieda
Copy link
Member

ubieda commented Aug 14, 2024

Is your enhancement proposal related to a problem? Please describe.
Based on a discussion in #74389, it was brought up that some RTIO users may need to perform transactions spaced by time-intervals. This is similar to how the Zephyr Workqueue works. Right now it is not possible as the RTIO Workqueue service does not have any means to achieve this.

Describe the solution you'd like
Add the ability to the RTIO Workqueue service to achieve this functionality.

This could be, for instance, achieved by adding an API rtio_work_req_schedule() similar to rtio_work_req_submit but with a k_timeout_t parameter describing when this item is due for execution.

Describe alternatives you've considered
Have users implement this functionality out of the RTIO workqueue service (e.g: have an additional delayed work item which in turn submits the RTIO workq item). This may be a short-term solution but does not seem scalable as more users re-invent the same functionality.

Additional considerations
This is a well-known feature already supported by the Zephyr workqueue, and that users are familiar with, which is why IMO it makes sense to include it under this service.

@ubieda ubieda added Enhancement Changes/Updates/Additions to existing features area: RTIO labels Aug 14, 2024
@ubieda
Copy link
Member Author

ubieda commented Aug 14, 2024

@FlorianWeber1018 LMK if you have any additional inputs on this!

@ubieda ubieda added this to the v4.0.0 milestone Aug 14, 2024
@ubieda ubieda self-assigned this Aug 14, 2024
@ubieda ubieda changed the title RTIO: Add Workqueue support for delayed workqueue items RTIO: Add Workqueue support for delayed work items Aug 15, 2024
@josuah
Copy link
Collaborator

josuah commented Aug 22, 2024

This is an interesting addition for combining RTIO and this particular Video driver:

@ubieda
Copy link
Member Author

ubieda commented Aug 22, 2024

This is an interesting addition for combining RTIO and this particular Video driver:

Thanks for sharing this! I'll find some time soon on this addition

@ubieda
Copy link
Member Author

ubieda commented Oct 1, 2024

Since the RTIO Workqueue is built on top of P4WQ, I'm thinking of implementing this feature for P4WQ and simply have RTIOWQ use it. Any thoughts/objections on this approach @teburd @andyross?

@FlorianWeber1018
Copy link
Contributor

gently ping @teburd @andyross.
#79637 and #74389 are waiting for this feature.

@bearsh
Copy link
Contributor

bearsh commented Nov 19, 2024

this would be a great addition since quite some hardware sensors do need a significant delay between triggering a new measurement and fetching the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTIO Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

6 participants