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

config-linux: clarify the handling of ClosID RDT parameter #1104

Merged
merged 2 commits into from Jul 9, 2021

Conversation

marquiz
Copy link
Contributor

@marquiz marquiz commented Apr 26, 2021

  • An attempt to make the spec easier to interpret by grouping all ClosID related contraints in one place.
  • fix indentation on IntelRdt, and split out the rules regarding interdependency of parameters into a separate list.

Also, split out the rules regarding interdependency of parameters into a
separate list.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
An attempt to make the spec easier to interpret by grouping all ClosID
related contraints in one place.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
* 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](runtime.md#errors) if directory does not exist.
* If `closID` is set, `l3CacheSchema` and/or `memBwSchema` is set, runtimes MUST compare `l3CacheSchema` and/or `memBwSchema` value with `schemata` file, and [generate an error](runtime.md#errors) if doesn't match.

* 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](runtime.md#errors) if directory does not exist.

This comment was marked as resolved.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, you do this in the second commit. Nice!

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 (non-binding)

@marquiz
Copy link
Contributor Author

marquiz commented May 4, 2021

Thanks for the review @kolyshkin!

Is there somebody I should assign this to or smth else to do except for sit and wait? 😄

@marquiz
Copy link
Contributor Author

marquiz commented May 13, 2021

ping

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

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

LGTM

@xiaochenshen
Copy link
Contributor

LGTM.

Making use of pre-configured ClosIDs is a good improvement, it helps prevent running out of hardware CLOSIDs in container user scenarios. The number of CLOSIDs have a hardware limit which is exposed by kernel resctrl filesystem, and is also exposed by runc events command (GetStats):
cat /sys/fs/resctrl/info/L3/num_closids
cat /sys/fs/resctrl/info/MB/num_closids

@marquiz
Copy link
Contributor Author

marquiz commented Jun 11, 2021

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

@marquiz
Copy link
Contributor Author

marquiz commented Jun 17, 2021

ping @crosbymichael could this be merged?

@marquiz
Copy link
Contributor Author

marquiz commented Jul 9, 2021

Is there a reason to keep this pending?

ping @crosbymichael @mrunalp @vbatts @dqminh @tianon @hqhq @cyphar @giuseppe

@vbatts vbatts merged commit 8961758 into opencontainers:master Jul 9, 2021
@marquiz
Copy link
Contributor Author

marquiz commented Jul 9, 2021

Thanks @vbatts 🚀 😄

@marquiz marquiz deleted the devel/rdt branch April 19, 2022 08:20
@AkihiroSuda AkihiroSuda mentioned this pull request Jan 24, 2023
@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Feb 1, 2023
@AkihiroSuda AkihiroSuda mentioned this pull request Jun 26, 2023
12 tasks

* If either `l3CacheSchema` or `memBwSchema` is set, runtimes MUST write the value to the `schemata` file in the that sub-directory discussed in `closID`.
* If `l3CacheSchema` contains a line beginning with `MB:`, the value written to `schemata` file MUST be the non-`MB:` line(s) from `l3CacheSchema` and the line from `memBWSchema`.
Copy link
Member

Choose a reason for hiding this comment

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

@marquiz I am looking at the specs to implement this in crun but I don't understand this rule.

Can you give an example? Should it be dropped (at least I don't see any special handling in runc either for this)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@giuseppe the idea is that if you have

l3CacheSchema: "L3:foobar\nMB:abcd"
memBWSchema: "MB:xyzy"

Then you'd actually write L3:foobar\nMB:xyzy to the schemata file.

I don't think this has been implemented anywhere. I didn't write this particular formulation, and TBH, I wouldn't probably bother implementing it. I think the fields and there handling is just ambiguously specified, e.g. somehow it's implied that l3CacheSchema could contain multiple lines but memBWSchema only one line. What if l3CacheSchema contains L3:... but memBWSchema: contains L3:... (and other similar questions)...

I try to address the problems in #1230

Copy link
Member

Choose a reason for hiding this comment

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

thanks, I understand now. Still feels weird to specify that MB: is filtered out instead of just not expecting such a case :-) but I guess we can live with it at this point

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

Successfully merging this pull request may close these issues.

None yet

7 participants