TSC tolerance patch, CPU-line fixes, ...

This commit is contained in:
kat witch 2022-01-10 17:06:26 +00:00 committed by kat
parent 3b6c1fd11d
commit 84b0a624cd
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
6 changed files with 48 additions and 5 deletions

View file

@ -185,6 +185,10 @@
mkIf (vfio-pci-ids != [ ]) {
options.ids = concatStringsSep "," vfio-pci-ids;
};
kvm_amd.options = {
avic = true;
npt = true;
};
};
services.udev.extraRules = ''

View file

@ -129,11 +129,11 @@ in {
(hugepages { where = "/dev/hugepages1G"; options = "pagesize=1GB,mode=0775"; })
];
fileSystems."/sys/fs/cgroup/cpuset" = {
/* fileSystems."/sys/fs/cgroup/cpuset" = {
device = "cpuset";
fsType = "cgroup";
noCheck = true;
};
}; */
systemd.services.preallocate-huggies = {
wantedBy = singleton "multi-user.target";
@ -149,9 +149,15 @@ in {
boot = lib.mkMerge [{
initrd.kernelModules = mkBefore [ "vfio" "vfio_iommu_type1" "vfio_pci" "vfio_virqfd" ];
kernelParams = [
];
kernelModules = [ "i2c-dev" ]; # i2c-dev is required for DDC/CI for screenstub
kernelPatches = with pkgs.kernelPatches; [
(mkIf config.deploy.profile.hardware.acs-override acs-override)
{
name = "clocksource-reduce-tsc-tolerance";
patch = ./tsc-tolerance.patch;
}
];
}
(mkIf (config.deploy.profile.hardware.amdgpu) {

View file

@ -0,0 +1,26 @@
From 5cac0c3c4383010f0579028de8decd6ede4bd460 Mon Sep 17 00:00:00 2001
From: Stefan Springer <stefanspr94@gmail.com>
Date: Sun, 3 Oct 2021 23:26:40 +0200
Subject: [PATCH] clocksource: set WATCHDOG_MAX_SKEW to 60
in order to find a more relaxed middleground between the old default (100) and the new one(50)
---
kernel/time/clocksource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index b8a14d2fb..f8f848d13 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -107,7 +107,7 @@ static u64 suspend_start;
* This delay could be due to SMIs, NMIs, or to VCPU preemptions. Used as
* a lower bound for cs->uncertainty_margin values when registering clocks.
*/
-#define WATCHDOG_MAX_SKEW (50 * NSEC_PER_USEC)
+#define WATCHDOG_MAX_SKEW (60 * NSEC_PER_USEC)
#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
static void clocksource_watchdog_work(struct work_struct *work);
--
2.32.0

@ -1 +1 @@
Subproject commit 5ebe55390f615f537be4eda6adaae6656d96655b
Subproject commit 82aa63dafe2fc353ab90475c2cc48069c32738c5