git.iko.soy/typeable/nixpkgs
on master help sign in
Use looser 9pfs caching in VM tests/builds

This can give significant speed ups, see https://github.com/edolstra/linux/commit/7e20254412c780a2102761fee92cb1d32ceeaefd.

commitbbd03e236a58e9344c91861513699e070186a3c5 authorEelco Dolstra <edolstra@gmail.com> dateThu 29 Dec 2016, 21:23 (10 years ago) parent87d5e27
4 files changed+14−4
nixos/modules/virtualisation/qemu-vm.nix+2−2 pkgs/build-support/vm/default.nix+2−2 pkgs/os-specific/linux/kernel/patches.nix+9 pkgs/top-level/all-packages.nix+1
nixos/modules/virtualisation/qemu-vm.nix+2−2
@@ -440,13 +440,13 @@ in
440440 ${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
441441 { device = "store";
442442 fsType = "9p";
443− options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
443+ options = [ "trans=virtio" "version=9p2000.L" "veryloose" ];
444444 neededForBoot = true;
445445 };
446446 "/tmp/xchg" =
447447 { device = "xchg";
448448 fsType = "9p";
449− options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
449+ options = [ "trans=virtio" "version=9p2000.L" "veryloose" ];
450450 neededForBoot = true;
451451 };
452452 "/tmp/shared" =
pkgs/build-support/vm/default.nix+2−2
@@ -130,7 +130,7 @@ rec {
130130
131131 echo "mounting Nix store..."
132132 mkdir -p /fs${storeDir}
133− mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose
133+ mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,veryloose
134134
135135 mkdir -p /fs/tmp /fs/run /fs/var
136136 mount -t tmpfs -o "mode=1777" none /fs/tmp
@@ -139,7 +139,7 @@ rec {
139139
140140 echo "mounting host's temporary directory..."
141141 mkdir -p /fs/tmp/xchg
142− mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose
142+ mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,veryloose
143143
144144 mkdir -p /fs/proc
145145 mount -t proc none /fs/proc
pkgs/os-specific/linux/kernel/patches.nix+9
@@ -175,4 +175,13 @@ rec {
175175 };
176176 };
177177
178+ p9_caching_4_4 = rec
179+ { name = "9p-caching.patch";
180+ patch = fetchpatch {
181+ inherit name;
182+ url = https://github.com/edolstra/linux/commit/d522582553368b9564e2d88a8d7b1d469bf98c65.patch;
183+ sha256 = "01h7461pdgavd6ghd6w9wg136hkaca0mrmmzhy6s3phksksimbc2";
184+ };
185+ };
186+
178187}
pkgs/top-level/all-packages.nix+1
@@ -11069,6 +11069,7 @@ in
1106911069 kernelPatches =
1107011070 [ kernelPatches.bridge_stp_helper
1107111071 kernelPatches.cpu-cgroup-v2."4.4"
11072+ kernelPatches.p9_caching_4_4
1107211073 ]
1107311074 ++ lib.optionals ((platform.kernelArch or null) == "mips")
1107411075 [ kernelPatches.mips_fpureg_emu