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

neonvm: introduce CPU sysfs state scaling flow based on the vmSpec.cpuScalingMode #1111

Merged
merged 18 commits into from
Nov 27, 2024

Commits on Nov 26, 2024

  1. neonvm-controller: add spec.cpuScalingMode, change vm-controller to e…

    …xplicitly default the field value if it is not set
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    2fb4c6c View commit details
    Browse the repository at this point in the history
  2. neonvmrunner,neonvmcontroller: allocate all possible CPUs to the VM a…

    …nd mark vmSpec.Guest.CPUs.Min as online during the boot
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    dd9b40c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c2f1e12 View commit details
    Browse the repository at this point in the history
  4. neonvm: sysfs cpu state based scaling support

    introduce separate CPU scaling flow based on the vmSpec.cpuScalingMode
    
    If vmSpec.cpuScalingMode is equal to `qmp_scaling` the logic of the
    scaling is preserved as before:
    
    - Scale, if required the amount of CPUs using qmp commands.
    - If it is required to scale cgroups, call vm-runner /cpu_change endpoint
    
    if vmSpec.cpuScalingMode is equal to `cpuSysfsStateScaling` all cpu
    scaling requests go directly to the vm-runner /cpu_change, which in
    that configuration goes to the neonvm-daemon to reconcile required
    amount of online CPUs.
    
    Value `cpuSysfsStateScaling` also modifies the qemu and the kernel
    arguments to enable plug all CPUs but mark as online only first one.
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    b634bb9 View commit details
    Browse the repository at this point in the history
  5. neonvm: apply code review fixes

    pass cpuScalingMode as argument to the vm-runner
    rename arguments, constants and functions here and there
    drop unused code
    move default cpu scaling mode to controller argument
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    32de84e View commit details
    Browse the repository at this point in the history
  6. neonvm-controller: apply lint and regenerate code

    Co-authored-by: Oleg Vasilev <[email protected]>
    mikhail-sakhnov and Omrigan committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d628a9a View commit details
    Browse the repository at this point in the history
  7. neonvm-controller: rename runner cpu functions

    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    37be0db View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1261b88 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9e56963 View commit details
    Browse the repository at this point in the history
  10. neonvm-runner: apply code review fixes and lint

    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    475efde View commit details
    Browse the repository at this point in the history
  11. neonvm: apply code review fixes

    change CpuScalingMode to be a enum type
    drop obsolete comments
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    28ab9c1 View commit details
    Browse the repository at this point in the history
  12. neonvm-controller: code review fixes

    Improve readability in pkg/neonvm/controllers/vm_controller_cpu_scaling.go
    by adding empty lines and comments
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    d6ff7c7 View commit details
    Browse the repository at this point in the history
  13. neonvm-daemon: apply code review fixes

    Change scaling logic to work with ranges instead of slices
    Split sys fs scaling struture to allow unit testing
    Add unit tests for the main reconcilation logic
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    09f0375 View commit details
    Browse the repository at this point in the history
  14. neonvm-daemon: apply code review fix

    Get current state through aggregated /cpu/online file
    instead of using per-cpu files
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    37e8226 View commit details
    Browse the repository at this point in the history
  15. neonvm: apply code review fixes

    Co-authored-by: Em Sharnoff <[email protected]>
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov and sharnoff committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    4532840 View commit details
    Browse the repository at this point in the history
  16. neonvm: apply code review fixes

    Change cpuscaling logic to work with collection of IDs
    
    Signed-off-by: Misha Sakhnov <[email protected]>
    mikhail-sakhnov committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    79721a2 View commit details
    Browse the repository at this point in the history
  17. Update neonvm-runner/cmd/main.go

    Co-authored-by: Oleg Vasilev <[email protected]>
    mikhail-sakhnov and Omrigan authored Nov 26, 2024
    Configuration menu
    Copy the full SHA
    fabb7ab View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2024

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