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

kernel/common-config: enable SCHED_DEBUG #69378

Merged
merged 1 commit into from Sep 25, 2019
Merged

Conversation

ivan
Copy link
Member

@ivan ivan commented Sep 24, 2019

Motivation for this change

This makes /proc/sys/kernel/sched_migration_cost_ns and other tunables available for configuring the scheduler. These tunables are mentioned in many places around the web, and it is surprising to not have them in NixOS. I checked the Debian kernel and it enables this option. I also confirmed that the oldest kernel that nixpkgs carries (4.4) has this option.

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.

I booted into a 4.19 kernel with this option enabled and it seemed to work fine. /proc/sys/kernel/sched_migration_cost_ns became available.

Notify maintainers

cc @thoughtpolice

@delroth may also want this

If accepted, please cherry-pick to staging-19.09 or let me know you want a backport PR.

@ivan
Copy link
Member Author

ivan commented Sep 24, 2019

I force-pushed and changed the base branch to staging, sorry about GitHub adding all the reviewers.

@teto
Copy link
Member

teto commented Sep 25, 2019

I added links towards arch and debian kernel configs on the wiki https://nixos.wiki/wiki/Linux_kernel, if you have a better link for the debian default config, that would be great !
arch and linux have this by default so I will merge it if no one objects soon. Not sure about the backport though. You can merge configs for oyur kernels via

  linux_latest_with_virtio = (prev.linux_latest.override {
    structuredExtraConfig = with structuredConfigs; (prev.lib.mkMerge [
      kvmConfigStructured
    ]);
  });

with 
  kvmConfigStructured = {
    KVM_CLOCK = yes;
    KVM_GUEST = yes;
};
for instance

@globin globin merged commit fe5a295 into NixOS:staging Sep 25, 2019
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