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

Set temporary single CPU affinity before cgroup cpuset transition. #3923

Merged
merged 1 commit into from
Apr 16, 2024

Commits on Apr 16, 2024

  1. Set temporary single CPU affinity before cgroup cpuset transition.

    This handles a corner case when joining a container having all
    the processes running exclusively on isolated CPU cores to force
    the kernel to schedule runc process on the first CPU core within the
    cgroups cpuset.
    
    The introduction of the kernel commit
    46a87b3851f0d6eb05e6d83d5c5a30df0eca8f76 has affected this deterministic
    scheduling behavior by distributing tasks across CPU cores within the
    cgroups cpuset. Some intensive real-time application are relying on this
    deterministic behavior and use the first CPU core to run a slow thread
    while other CPU cores are fully used by real-time threads with SCHED_FIFO
    policy. Such applications prevents runc process from joining a container
    when the runc process is randomly scheduled on a CPU core owned by a
    real-time thread.
    
    Introduces isolated CPU affinity transition OCI runtime annotation
    org.opencontainers.runc.exec.isolated-cpu-affinity-transition to restore
    the behavior during runc exec.
    
    Fix issue with kernel >= 6.2 not resetting CPU affinity for container processes.
    
    Signed-off-by: Cédric Clerget <[email protected]>
    cclerget committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    afc23e3 View commit details
    Browse the repository at this point in the history