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.

Sorry, something went wrong.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 501+ 10.rebuild-linux: 1001-2500 labels Sep 24, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@ivan ivan force-pushed the kernel-sched-debug branch from caa1ea2 to 97cc421 Compare September 24, 2019 20:29
@ivan ivan changed the base branch from master to staging September 24, 2019 20:30
@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.

@ofborg ofborg bot added 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell 6.topic: lua 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: pantheon The Pantheon desktop environment 6.topic: printing 6.topic: python 6.topic: qt/kde 6.topic: ruby 6.topic: stdenv Standard environment 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux-stdenv This PR causes stdenv to rebuild 8.has: clean-up labels Sep 24, 2019
@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
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: clean-up 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux: 501+ 10.rebuild-linux: 5001+ 10.rebuild-linux-stdenv This PR causes stdenv to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants