Use looser 9pfs caching in VM tests/builds
This can give significant speed ups, see
7e20254412
.
This commit is contained in:
parent
87d5e27a3d
commit
bbd03e236a
@ -440,13 +440,13 @@ in
|
|||||||
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
|
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
|
||||||
{ device = "store";
|
{ device = "store";
|
||||||
fsType = "9p";
|
fsType = "9p";
|
||||||
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
|
options = [ "trans=virtio" "version=9p2000.L" "veryloose" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
"/tmp/xchg" =
|
"/tmp/xchg" =
|
||||||
{ device = "xchg";
|
{ device = "xchg";
|
||||||
fsType = "9p";
|
fsType = "9p";
|
||||||
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
|
options = [ "trans=virtio" "version=9p2000.L" "veryloose" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
"/tmp/shared" =
|
"/tmp/shared" =
|
||||||
|
@ -130,7 +130,7 @@ rec {
|
|||||||
|
|
||||||
echo "mounting Nix store..."
|
echo "mounting Nix store..."
|
||||||
mkdir -p /fs${storeDir}
|
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
|
mkdir -p /fs/tmp /fs/run /fs/var
|
||||||
mount -t tmpfs -o "mode=1777" none /fs/tmp
|
mount -t tmpfs -o "mode=1777" none /fs/tmp
|
||||||
@ -139,7 +139,7 @@ rec {
|
|||||||
|
|
||||||
echo "mounting host's temporary directory..."
|
echo "mounting host's temporary directory..."
|
||||||
mkdir -p /fs/tmp/xchg
|
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
|
mkdir -p /fs/proc
|
||||||
mount -t proc none /fs/proc
|
mount -t proc none /fs/proc
|
||||||
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11069,6 +11069,7 @@ in
|
|||||||
kernelPatches =
|
kernelPatches =
|
||||||
[ kernelPatches.bridge_stp_helper
|
[ kernelPatches.bridge_stp_helper
|
||||||
kernelPatches.cpu-cgroup-v2."4.4"
|
kernelPatches.cpu-cgroup-v2."4.4"
|
||||||
|
kernelPatches.p9_caching_4_4
|
||||||
]
|
]
|
||||||
++ lib.optionals ((platform.kernelArch or null) == "mips")
|
++ lib.optionals ((platform.kernelArch or null) == "mips")
|
||||||
[ kernelPatches.mips_fpureg_emu
|
[ kernelPatches.mips_fpureg_emu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user