Skip to content

Conversation

@haircommander
Copy link
Contributor

Old kernels do that automatically, but new kernels remember the affinity that was set before the cgroup move due to

https://lore.kernel.org/lkml/[email protected]

This is undesirable for containers, because they inherit the systemd affinity when the should really move to the container space cpus.

Draft as the required patch set is not yet merged upstream

@haircommander haircommander force-pushed the cpu-affinity-reset branch 3 times, most recently from f96de14 to cad71a0 Compare September 28, 2023 15:55
@haircommander haircommander force-pushed the cpu-affinity-reset branch 2 times, most recently from 22c6427 to 902a7da Compare September 28, 2023 17:52
@kolyshkin
Copy link
Contributor

nit: you can also add Co-authored-by: Martin Sivak <[email protected]>

@haircommander haircommander force-pushed the cpu-affinity-reset branch 2 times, most recently from c06381c to d946178 Compare September 28, 2023 18:28
Old kernels do that automatically, but new kernels remember
the affinity that was set before the cgroup move due to

https://lore.kernel.org/lkml/[email protected]

This is undesirable for containers, because they inherit
the systemd affinity when the should really move to the container
space cpus.

see https://issues.redhat.com/browse/OCPBUGS-15102 for more information

Co-authored-by:  Martin Sivak <[email protected]>
Signed-off-by: Peter Hunt <[email protected]>
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

@kolyshkin
Copy link
Contributor

@haircommander is this still a draft?

@kolyshkin
Copy link
Contributor

AFAIK this relies on the kernel patch which is still not merged: https://lore.kernel.org/lkml/[email protected]/ (@haircommander please correct me if I'm wrong)

@haircommander
Copy link
Contributor Author

correct! still a draft for that reason

@cyphar
Copy link
Member

cyphar commented Aug 21, 2025

Actually the sched patches were merged in Linux 6.2 (torvalds/linux@bf57ae2) but this PR won't actually work, for the reasons I explain in #4858 (comment).

@cyphar cyphar closed this in #4858 Aug 28, 2025
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.

3 participants