-
Notifications
You must be signed in to change notification settings - Fork 369
intelrdt: honor default closID #1858
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR introduces special handling for the default Intel RDT CLOS ID (“/”) by adding helper functions to detect and build paths accordingly, and updates all rdt-related operations to skip unnecessary file-system interactions for the default CLOS. Class diagram for updated Intel RDT CLOS handlingclassDiagram
class IntelRDT {
+compare_rdt_configurations(a, b)
+validate_rdt_configuration(name, l3_cache_schema, mem_bw_schema, err)
+resctl_create(name, explicit_clos_id, created, l3_cache_schema, mem_bw_schema, err)
+resctl_move_task_to(name, pid, err)
+resctl_update(name, l3_cache_schema, mem_bw_schema, schemata, err)
+resctl_destroy(name, err)
}
class get_resctrl_path {
+get_resctrl_path(path, file, name, err)
}
class is_default_clos {
+is_default_clos(name)
}
IntelRDT --> get_resctrl_path : uses
IntelRDT --> is_default_clos : uses
get_resctrl_path --> is_default_clos : calls
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes - here's some feedback:
- Extract the default CLOS ID string "/" into a named constant (e.g., DEFAULT_CLOS_ID) instead of hardcoding it in is_default_clos.
- Add a null or empty check for the
name
parameter in is_default_clos (or get_resctrl_path) to prevent potential null pointer dereferences. - Include a brief code comment or link to the OCI runtime-spec PR explaining why the default CLOS ID is represented as "/".
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Extract the default CLOS ID string "/" into a named constant (e.g., DEFAULT_CLOS_ID) instead of hardcoding it in is_default_clos.
- Add a null or empty check for the `name` parameter in is_default_clos (or get_resctrl_path) to prevent potential null pointer dereferences.
- Include a brief code comment or link to the OCI runtime-spec PR explaining why the default CLOS ID is represented as "/".
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
5214e61
to
89a5afc
Compare
TMT tests failed. @containers/packit-build please check. |
Signed-off-by: Giuseppe Scrivano <[email protected]>
implement the change specified here: opencontainers/runtime-spec#1289 Signed-off-by: Giuseppe Scrivano <[email protected]>
89a5afc
to
275305f
Compare
implement the change specified here:
opencontainers/runtime-spec#1289
Summary by Sourcery
Implement handling of the default CLOS ID per OCI runtime-spec: treat name '/' as the default clos, adjust file path resolution accordingly, and skip creation, validation, and destruction operations for it
Enhancements: