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

Read cpu.stat regardless if controller enabled. #348

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 3, 2024

  1. Read cpu.stat regardless if controller enabled.

    The unified hierarchy provides the cpu.stat file for every cgroup,
    regardless if the CPU controller is enabled (in fact, setting the
    systemd property CPUAccounting=True does not enable this controller
    because of this fact). It provides the usage_usec, user_usec,
    and system_usec by default. Instead of reading the stat for each
    enabled controller (CPU and memory), just attempt to read them
    each time the Stat() function is called.
    
    Attempting to read the memory.stat file even if memory accounting
    is not enabled seems insignificant (some other files always have
    a read attempt, such as memory.current), and eliminates finding and
    looping over enabled controllers.
    
    Resolves: containerd#347
    
    Signed-off-by: Jackson McKay  <[email protected]>
    jay-mckay committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    63aa1c0 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2024

  1. Configuration menu
    Copy the full SHA
    bb4286e View commit details
    Browse the repository at this point in the history