-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
lib/ukstore: Introduce dynamic store API #939
Conversation
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.
Some small comments from my side, it looks good 🙏
I hope you also modified the code to be in accordance with the new coding conventions 😅
I saw also some errors in checkpatch, if those are actually ok, add the |
In the PR text also add |
6445a3f
to
0489936
Compare
When @skuenzer is happy I'll also add my tag and we can merge |
0489936
to
31db98c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
lib/ukstore/include/uk/store.h
Outdated
* @param library_id owner library id as returned by uklibid | ||
* @param object_id object id | ||
*/ | ||
void uk_store_release_object(__u16 library_id, __u64 object_id); |
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.
Would void uk_store_release_object(struct uk_store_object *obj);
work as well? I remember we had a longer discussion about this but I don't remember the result.
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.
From a look at the client side, I see no reason why we can't do that. Yet this needs to be changed with clear mind as it affects how we lock the refcounts. I will look at it tomorrow morning.
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.
I agree, sounds good.
93cb914
to
6d0c66b
Compare
@skuenzer I addressed all review comments except from #939 (comment) which I will look at tomorrow morning. I marked the rest as resolved. |
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Checkpatch-Ignore: LONG_LINE Signed-off-by: Michalis Pappas <michalis@unikraft.io>
37a9f22
to
682c47b
Compare
@skuenzer all changes are in now, including an updated |
ad701a2
to
e16a7fc
Compare
Remove cookie from static uk_store entries. This is in anticipation of dynamic entries that provide a cookie at the object level. Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Introduce an id property to uk_store entries and replace name with id on lookup operations, to avoid costly string comparison. Signed-off-by: Michalis Pappas <michalis@unikraft.io>
…initions Update calls to UK_STORE_STATIC_ENTRIES to remove the deprecated cookie parameter. Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Introduce header for definitions related to uk_store. Add entry IDs for stats tracked by uk_alloc, and update static entry definitions to pass entry IDs. Signed-off-by: Michalis Pappas <michalis@unikraft.io>
This commit adds dynamic entry support to uk_store. Libraries can dynamically register uk_store objects at runtime, each one of which is associated with one or more entries. Similarly to static entries, each dynamic entry is associated with a getter and / or a setter. Consumers are notified for the lifetime of objects via events. Checkpatch-Ignore: SPACING LONG_LINE GitHub-Closes: unikraft#539 Co-authored-by: Michalis Pappas <michalis@unikraft.io> Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com> Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
e16a7fc
to
2e7d060
Compare
@michpappas : I just rebased this PR to latest |
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
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.
Thanks a lot for all your work @craciunoiuc and @michpappas
Reviewed-by: Simon Kuenzer simon@unikraft.io
Approved-by: Simon Kuenzer simon@unikraft.io
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.
All good here. Thanks!
Reviewed-by: Cezar Craciunoiu cezar.craciunoiu@unikraft.io
Introduce an id property to uk_store entries and replace name with id on lookup operations, to avoid costly string comparison. Signed-off-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #939
…initions Update calls to UK_STORE_STATIC_ENTRIES to remove the deprecated cookie parameter. Signed-off-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #939
Introduce header for definitions related to uk_store. Add entry IDs for stats tracked by uk_alloc, and update static entry definitions to pass entry IDs. Signed-off-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #939
This commit adds dynamic entry support to uk_store. Libraries can dynamically register uk_store objects at runtime, each one of which is associated with one or more entries. Similarly to static entries, each dynamic entry is associated with a getter and / or a setter. Consumers are notified for the lifetime of objects via events. Checkpatch-Ignore: SPACING LONG_LINE GitHub-Closes: #539 Co-authored-by: Michalis Pappas <michalis@unikraft.io> Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com> Signed-off-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #939
Signed-off-by: Michalis Pappas <michalis@unikraft.io> Reviewed-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #939
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
x86_64
or N/A]kvm
,xen
or N/A]app-python3
or N/A]Additional configuration
Description of changes
This series adds dynamic entry support to uk_store. Libraries can dynamically register uk_store objects at runtime, each one of which is associated with one or more entries. Similarly to static entries, each dynamic entry is associated with a getter and / or a setter.
Consumers are notified for the lifetime of objects via events.
GitHub-Supersedes: #460
GitHub-Depends-On: #938