-
Notifications
You must be signed in to change notification settings - Fork 42
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
resrc: Add resource API context support #236
Conversation
Add get_resrc_reqst and move the logic to fill resrc_reqst to this function. Enhance readability of schedule_job which has grown somewhat large. More importantly, being ready to encode resource aggregate info without having to modify the main schedule_job function.
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
=========================================
+ Coverage 55.05% 55.3% +0.24%
=========================================
Files 25 25
Lines 5184 5204 +20
Branches 1168 1181 +13
=========================================
+ Hits 2854 2878 +24
+ Misses 1626 1616 -10
- Partials 704 710 +6
Continue to review full report at Codecov.
|
resrc/test/tresrc.c
Outdated
ok (((resrc = resrc_create_cluster ("cluster")) != 0), | ||
"cluster resource creation succeeded"); | ||
ok ((resrc_generate_hwloc_resources (resrc, topology, NULL, NULL) != 0), | ||
/* Generate teh hardware hiearchy of resources using hwloc reader */ |
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.
teh -> the
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.
also hiearchy -> hierarchy :-)
@dongahn, looks great! I'm ready to merge once typos are fixed. There are 4 misspelled "hiearchy" in tresrc.c. |
Got it. Will work on this and push. |
Add resource API context support to streamline our future scheduling improvements which includes upcoming scheduler-driven aggregate updates work. Add resrc_api.h where resrc_api_init () and resrc_api_fini () are declared. resrc_api_init () creates and initializes an instance of the resource APIs which are implemented across resrc, resrc_tree, resrc_flow, and resrc_reqst. Once the context is returned from resrc_api_init (), the caller must pass it as an opaque handle to certain API calls in the resrc and friends. This allows these APIs to act on the specific API instance. Define struct resrc_api_ctx in resrc_api_internal.h which should only be included om resource API internal implementation files Over time, resrc_api will add some other API-level functions that will allow an API instance to be specialized. Add, delete and revise some API calls and internals as part of this commit, as well: - Add query routines into resrc tree/flow APIs to allow users to fetch the roots of constructed graphs using the resource API context; - Clean up rsreader APIs and sched internals a bit using these new routines
Ok. Ready. |
Add resource API context support + some minor cleanup