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

linux/kernel: enable automatic cpu hotplug support #65273

Merged
merged 1 commit into from Jul 23, 2019

Conversation

aanderse
Copy link
Member

@aanderse aanderse commented Jul 22, 2019

Motivation for this change

A follow-up to #54095 to allow automatic hotplug support, skipping the manual steps of adding new CPU or RAM.

Can be tested with the following config:

services.udev.extraRules = optionalString (pkgs.stdenv.hostPlatform.system == "x86_64-linux" || pkgs.stdenv.hostPlatform.system == "aarch64-linux") ''
  # CPU hotadd request
  SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"

  # Memory hotadd request
  SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online"
'';

Note: I have built and tested this against 19.03 and master.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@samueldr
Copy link
Member

@GrahamcOfBorg build linux

Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

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

The other two options look good. They are old enough that we don't need to worry with gating them under versions.

pkgs/os-specific/linux/kernel/common-config.nix Outdated Show resolved Hide resolved
@aanderse aanderse changed the title linux/kernel: enable automatic memory hotplug support linux/kernel: enable automatic cpu hotplug support Jul 23, 2019
Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

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

I will not have tested the feature, but looking at the documentation for the feature, I don't think there is any issue enabling the features on either of the two platforms it's been enabled here.

@aanderse
Copy link
Member Author

Thanks for taking a look everyone. I have tested the most recent revision against master and everything looking good to me. Please feel free to merge if everyone is satisfied.

@peterhoeg peterhoeg merged commit 94aea76 into NixOS:master Jul 23, 2019
@aanderse aanderse deleted the automatic-hotplug branch July 23, 2019 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants