Skip to content

Conversation

@marquiz
Copy link
Contributor

@marquiz marquiz commented Sep 4, 2025

No description provided.

@marquiz marquiz force-pushed the devel/rdt-monitoring-kustomize branch from a074068 to 7864431 Compare September 4, 2025 12:14
@marquiz
Copy link
Contributor Author

marquiz commented Sep 4, 2025

delete() {
# MON group is reaped as part of the CLOS (by the runtime) if it was under
# a dedicated CLOS created for this container
if [ "$closid" != "$id" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

$closid ? Shouldn't this be [ "$clos" != "$id" ] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

YES, well-spotted, thanks. Fixed

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
@marquiz marquiz force-pushed the devel/rdt-monitoring-kustomize branch from 7864431 to 91fbf06 Compare September 8, 2025 08:47
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

is it necessary to include dependency installation of the hook injector here?

@marquiz
Copy link
Contributor Author

marquiz commented Sep 9, 2025

is it necessary to include dependency installation of the hook injector here?

This is using the hook-injector as a dependency, see the kustomization.yaml

...
resources:
  - ../../hook-injector/unstable

Iow, this takes the hook-injector sample deployment as a base and does customization on top of that.

@klihub klihub requested a review from mikebrow September 9, 2025 13:28
@yonch
Copy link

yonch commented Sep 9, 2025

Hi team! Got a reference to this PR from @kad . This is a nice, simple approach! 👍

I'm working on an NRI-based container monitor that handles pre-existing containers: unvariance/collector#252

One of the problems is how to reliably pull all tasks of a cgroup into the resctrl group given tasks are live (they can fork as we're adding tasks, creating coverage gaps). If you have any feedback please share.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

@klihub
Copy link
Member

klihub commented Sep 10, 2025

Hi team! Got a reference to this PR from @kad . This is a nice, simple approach! 👍

I'm working on an NRI-based container monitor that handles pre-existing containers: unvariance/collector#252

One of the problems is how to reliably pull all tasks of a cgroup into the resctrl group given tasks are live (they can fork as we're adding tasks, creating coverage gaps). If you have any feedback please share.

@yonch I think there is unfortunately no easy reliable, yet unintrusive way of doing that. A potentially intrusive way is cgroup freezing. Freeze the cgroup of the container (or the whole pod), wait for it to get frozen, assign all the tasks to the resctrl group (if this works while the cgroup/task is frozen, haven't tried it), then unfreeze the cgroup.

@klihub klihub merged commit 3c85968 into containerd:main Sep 10, 2025
16 checks passed
@marquiz marquiz deleted the devel/rdt-monitoring-kustomize branch September 10, 2025 09:11
@marquiz
Copy link
Contributor Author

marquiz commented Sep 10, 2025

@yonch I think there is unfortunately no easy reliable, yet unintrusive way of doing that. A potentially intrusive way is cgroup freezing. Freeze the cgroup of the container (or the whole pod), wait for it to get frozen, assign all the tasks to the resctrl group (if this works while the cgroup/task is frozen, haven't tried it), then unfreeze the cgroup.

Yes, unfortunately I cannot think of any other race-free approach than the freezer which obviously is a BIG hammer. If you ask me the kernel should provide a simple way to do the migration but 🤷‍♂️

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.

4 participants