Skip to content
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

libcontainer/intelrdt: support ClosID parameter #2920

Merged
merged 5 commits into from
Aug 31, 2021

Conversation

marquiz
Copy link
Contributor

@marquiz marquiz commented Apr 26, 2021

  • Handle ClosID parameter of IntelRdt. Makes it possible to use
    pre-configured classes/ClosIDs and avoid running out of available IDs
    which easily happens with per-container classes.

  • libcontainer/intelrdt: verify ClosID existence
    Check that the ClosID directory pre-exists if no L3 or MB schema has
    been specified. Conform with the following line from runtime-spec
    (config-linux):

    If closID is set, and neither of l3CacheSchema and memBwSchema are
    set, runtime MUST check if corresponding pre-configured directory
    closID is present in mounted resctrl. If such pre-configured directory
    closID exists, runtime MUST assign container to this closID and
    generate an error if directory does not exist.

  • Add a TODO note for verifying existing schemata against L3/MB
    parameters.

  • Run unit tests irrespective of the underlying system configuration, i.e.
    even if RDT has not been enabled or is not supported. The tests do not
    depend on real kernel interfaces.

@kolyshkin
Copy link
Contributor

Looks good overall, added some notes.

Also, the first commit performs a nice refactoring (which I like), but it is kind of hard to review because it also introduces ClosID support. Can you maybe split it into (1) refactoring (2) adding ClosID?

@marquiz
Copy link
Contributor Author

marquiz commented Apr 28, 2021

Thanks for the review @kolyshkin!

Also, the first commit performs a nice refactoring (which I like), but it is kind of hard to review because it also introduces ClosID support. Can you maybe split it into (1) refactoring (2) adding ClosID?

Yeah, I see 😊 I now split the first commit into two

@marquiz
Copy link
Contributor Author

marquiz commented Apr 28, 2021

BTW, related, I submitted a PR against runtime-spec in an attempt to make it easier read:
opencontainers/runtime-spec#1104

@marquiz
Copy link
Contributor Author

marquiz commented Apr 30, 2021

Ping @kolyshkin. Could you enable testing?

@marquiz
Copy link
Contributor Author

marquiz commented May 11, 2021

Rebased and added validation for ClosID parameter

ping @kolyshkin

@marquiz
Copy link
Contributor Author

marquiz commented May 18, 2021

@kolyshkin anything I can do to advance this? The latest review comment(s) should be addressed, now

@marquiz
Copy link
Contributor Author

marquiz commented May 25, 2021

ping @kolyshkin

@marquiz
Copy link
Contributor Author

marquiz commented May 25, 2021

How to re-run tests??
/retest

@marquiz
Copy link
Contributor Author

marquiz commented Jun 11, 2021

ping @kolyshkin. How to get this forward?

@cyphar
Copy link
Member

cyphar commented Jun 11, 2021

We need to manually retrigger them, there isn't a bot to control them unfortunately. But you can retrigger it by force pushing a new commit (git commit --amend && git push --force ... with no code or commit changes).

(I've retriggered it.)

@cyphar cyphar added this to the post-1.0 milestone Jun 11, 2021
@kolyshkin kolyshkin modified the milestones: post-1.0, 1.1.0 Jun 11, 2021
@kolyshkin
Copy link
Contributor

you can retrigger it by force pushing a new commit

One other way is to close and reopen a PR.

Handle ClosID parameter of IntelRdt. Makes it possible to use
pre-configured classes/ClosIDs and avoid running out of available IDs
which easily happens with per-container classes.

Remove validator checks for empty L3CacheSchema and MemBwSchema fields
in order to be able to leave them empty, and only specify ClosID for
a pre-configured class.

Signed-off-by: Markus Lehtonen <[email protected]>
Check that the ClosID directory pre-exists if no L3 or MB schema has
been specified. Conform with the following line from runtime-spec
(config-linux):

  If closID is set, and neither of l3CacheSchema and memBwSchema are
  set, runtime MUST check if corresponding pre-configured directory
  closID is present in mounted resctrl. If such pre-configured directory
  closID exists, runtime MUST assign container to this closID and
  generate an error if directory does not exist.

Add a TODO note for verifying existing schemata against L3/MB
parameters.

Signed-off-by: Markus Lehtonen <[email protected]>
@marquiz
Copy link
Contributor Author

marquiz commented Aug 9, 2021

Rebased

Run unit tests irrespective of the underlying system configuration, i.e.
even if RDT has not been enabled or is not supported. The tests do not
depend on real kernel interfaces.

Signed-off-by: Markus Lehtonen <[email protected]>
@marquiz
Copy link
Contributor Author

marquiz commented Aug 9, 2021

Re-triggered tests by force push as there was some spurious test failure in i386 😕

@marquiz
Copy link
Contributor Author

marquiz commented Aug 12, 2021

@marquiz
Copy link
Contributor Author

marquiz commented Aug 18, 2021

ping @crosbymichael @mrunalp @dqminh @hqhq @cyphar @AkihiroSuda @kolyshkin ❗️

This starts to be critical as RDT support was merged in CRI-O and we really need the runc to support it, too.
cri-o/cri-o#4830

kolyshkin
kolyshkin previously approved these changes Aug 19, 2021
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM :)

@akihiro @thaJeztah PTAL

@@ -532,14 +518,18 @@ func IsMBAScEnabled() bool {
}

// Get the 'container_id' path in Intel RDT "resource control" filesystem
Copy link
Member

@AkihiroSuda AkihiroSuda Aug 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps “container_id” -> “ClosID” ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks. I addressed this in a separate patch, modifying some other code comments as well. I used the term clos group

AkihiroSuda
AkihiroSuda previously approved these changes Aug 20, 2021
Use the term "clos group" instead of "container_id group" as the group
that a container belongs to is not necessarily tied to its container id.

Signed-off-by: Markus Lehtonen <[email protected]>
@marquiz
Copy link
Contributor Author

marquiz commented Aug 20, 2021

Signed-off-by was missing from the last patch 😭

@marquiz
Copy link
Contributor Author

marquiz commented Aug 23, 2021

ping @kolyshkin

@marquiz marquiz requested a review from kolyshkin August 24, 2021 11:48
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants