intelrdt: honor default closID#1858
Merged
kolyshkin merged 2 commits intocontainers:mainfrom Sep 15, 2025
Merged
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.
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
nameparameter 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.
kolyshkin
reviewed
Aug 28, 2025
kolyshkin
reviewed
Sep 3, 2025
5214e61 to
89a5afc
Compare
|
TMT tests failed. @containers/packit-build please check. |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
implement the change specified here: opencontainers/runtime-spec#1289 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
89a5afc to
275305f
Compare
Member
Author
|
@kolyshkin @flouthoc PTAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: