mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Boot] add amd cluster id patches
This commit is contained in:
parent
b5e030c852
commit
ac42f2fa18
1 changed files with 13 additions and 0 deletions
13
boot.nix
13
boot.nix
|
|
@ -22,6 +22,16 @@ let
|
||||||
ENERGY_MODEL y
|
ENERGY_MODEL y
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
amdClusterId = {
|
||||||
|
name = "cluster-id-amd";
|
||||||
|
patch = pkgs.fetchpatch {
|
||||||
|
url = "https://lkml.org/lkml/diff/2023/4/10/479/1";
|
||||||
|
hash = "sha256-bpe+iWYQldlGiIlWr4XPbIBPQBetEjfRKZ0Te2I14dk=";
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
SCHED_CLUSTER y
|
||||||
|
'';
|
||||||
|
};
|
||||||
optimizeForCPUArch = arch: let
|
optimizeForCPUArch = arch: let
|
||||||
archConfigMap = {
|
archConfigMap = {
|
||||||
"k8" = "K8"; "opteron" = "K8"; "athlon64" = "K8"; "athlon-fx" = "K8";
|
"k8" = "K8"; "opteron" = "K8"; "athlon64" = "K8"; "athlon-fx" = "K8";
|
||||||
|
|
@ -104,6 +114,7 @@ in {
|
||||||
kvdo.enable = mkEnableOption "dm-kvdo kernel module";
|
kvdo.enable = mkEnableOption "dm-kvdo kernel module";
|
||||||
rtGroupSched.enable = mkEnableOption "RT cgroups";
|
rtGroupSched.enable = mkEnableOption "RT cgroups";
|
||||||
energyModel.enable = mkEnableOption "Energy Model";
|
energyModel.enable = mkEnableOption "Energy Model";
|
||||||
|
amdClusterId.enable = mkEnableOption "Energy Model";
|
||||||
|
|
||||||
efi = mkOption rec {
|
efi = mkOption rec {
|
||||||
description = "Use EFI bootloader";
|
description = "Use EFI bootloader";
|
||||||
|
|
@ -186,9 +197,11 @@ in {
|
||||||
++ optional cfg.x32abi.enable customKernelPatches.enableX32ABI
|
++ optional cfg.x32abi.enable customKernelPatches.enableX32ABI
|
||||||
++ optional cfg.rtGroupSched.enable customKernelPatches.enableRTGroupSched
|
++ optional cfg.rtGroupSched.enable customKernelPatches.enableRTGroupSched
|
||||||
++ optional cfg.energyModel.enable customKernelPatches.enableEnergyModel
|
++ optional cfg.energyModel.enable customKernelPatches.enableEnergyModel
|
||||||
|
++ optional cfg.amdClusterId.enable customKernelPatches.amdClusterId
|
||||||
++ optional (isXanmod cfg.kernel && config.aviallon.optimizations.enable) (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpuArch)
|
++ optional (isXanmod cfg.kernel && config.aviallon.optimizations.enable) (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpuArch)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
loader.grub.enable = cfg.useGrub;
|
loader.grub.enable = cfg.useGrub;
|
||||||
loader.grub = {
|
loader.grub = {
|
||||||
version = 2;
|
version = 2;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue