Use looser 9pfs caching in VM tests/builds

This can give significant speed ups, see
7e20254412.
This commit is contained in:
Eelco Dolstra 2016-12-29 21:23:21 +01:00
parent 87d5e27a3d
commit bbd03e236a
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
4 changed files with 14 additions and 4 deletions

View File

@ -440,13 +440,13 @@ in
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
{ device = "store";
fsType = "9p";
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
options = [ "trans=virtio" "version=9p2000.L" "veryloose" ];
neededForBoot = true;
};
"/tmp/xchg" =
{ device = "xchg";
fsType = "9p";
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
options = [ "trans=virtio" "version=9p2000.L" "veryloose" ];
neededForBoot = true;
};
"/tmp/shared" =

View File

@ -130,7 +130,7 @@ rec {
echo "mounting Nix store..."
mkdir -p /fs${storeDir}
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,cache=loose
mount -t 9p store /fs${storeDir} -o trans=virtio,version=9p2000.L,veryloose
mkdir -p /fs/tmp /fs/run /fs/var
mount -t tmpfs -o "mode=1777" none /fs/tmp
@ -139,7 +139,7 @@ rec {
echo "mounting host's temporary directory..."
mkdir -p /fs/tmp/xchg
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,cache=loose
mount -t 9p xchg /fs/tmp/xchg -o trans=virtio,version=9p2000.L,veryloose
mkdir -p /fs/proc
mount -t proc none /fs/proc

View File

@ -175,4 +175,13 @@ rec {
};
};
p9_caching_4_4 = rec
{ name = "9p-caching.patch";
patch = fetchpatch {
inherit name;
url = https://github.com/edolstra/linux/commit/d522582553368b9564e2d88a8d7b1d469bf98c65.patch;
sha256 = "01h7461pdgavd6ghd6w9wg136hkaca0mrmmzhy6s3phksksimbc2";
};
};
}

View File

@ -11069,6 +11069,7 @@ in
kernelPatches =
[ kernelPatches.bridge_stp_helper
kernelPatches.cpu-cgroup-v2."4.4"
kernelPatches.p9_caching_4_4
]
++ lib.optionals ((platform.kernelArch or null) == "mips")
[ kernelPatches.mips_fpureg_emu