-
-
Notifications
You must be signed in to change notification settings - Fork 779
grant: added remove_pending_upcalls function #4267
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
Conversation
|
I like this addition, it makes sense for a driver to be able to "update" a scheduled, but not yet delivered upcall. One change that would make it even more useful is to return the number of upcalls removed, or better yet, an iterator over them. A driver can then use this to reason about whether an upcall was delivered, and consequently whether scheduling another, updated one is necessary or not. |
Added a method to GrantKernelData that removes all pending upcalls of the current driver with the given subscriber_num from the process's upcall queue.
3bdc529 to
a837734
Compare
Changed remove_pending_upcalls to return the number of tasks removed. Added an API to call remove_upcall from GrantKernelData.
c057fe3
|
I modified the function so that it returns the number of upcalls removed. |
|
Since there are no current uses of these methods upstream (at least in this PR), can you an example use case to help reason about the API? |
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.
Generally looks good to me!
Sorry for the delay. If an app does not call With this API, the capsule could delete all old requests when issuing a new one. |
Pull Request Overview
This pull request adds a method to
GrantKernelDatathat removes all pending upcalls of the current driver with the givensubscriber_numfrom the process's upcall queue.This was needed in order to remove outdated upcalls from within a capsule.
Testing Strategy
This pull request was tested by implementing a capsule that uses this feature.
Documentation Updated
Formatting
make prepush.