GNU bug report logs - #66156
[PATCH 00/12] Introducing Smart Hurdloading

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Fri, 22 Sep 2023 12:54:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 66156 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 66156 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 01/12] system: vm: Remove unused variable.
Date: Fri, 22 Sep 2023 14:54:02 +0200
This is a followup to 05a9d1f378e2e13e8f759be926ea368358afc27c, which
removed its sole user.

* gnu/system/vm.scm (%linux-vm-file-systems): Remove.
(mapping->file-system): Add comment about “cache=loose”.
---
 gnu/system/vm.scm | 41 ++++++-----------------------------------
 1 file changed, 6 insertions(+), 35 deletions(-)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index b7bccd72a4..70f7b00116 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -87,41 +87,6 @@ (define-module (gnu system vm)
 ;; conservative default.
 (define %default-msize-value (* 100 (expt 2 20))) ;100 MiB
 
-(define %linux-vm-file-systems
-  ;; File systems mounted for 'derivation-in-linux-vm'.  These are shared with
-  ;; the host over 9p.
-  ;;
-  ;; The 9p documentation says that cache=loose is "intended for exclusive,
-  ;; read-only mounts", without additional details.  It's much faster than the
-  ;; default cache=none, especially when copying and registering store items.
-  ;; Thus, use cache=loose, except for /xchg where we want to ensure
-  ;; consistency.
-  (list (file-system
-          (mount-point (%store-prefix))
-          (device "store")
-          (type "9p")
-          (needed-for-boot? #t)
-          (flags '(read-only))
-          (options (format #f "trans=virtio,cache=loose,msize=~a"
-                           %default-msize-value))
-          (check? #f))
-        (file-system
-          (mount-point "/xchg")
-          (device "xchg")
-          (type "9p")
-          (needed-for-boot? #t)
-          (options (format #f "trans=virtio,msize=~a" %default-msize-value))
-          (check? #f))
-        (file-system
-          (mount-point "/tmp")
-          (device "tmp")
-          (type "9p")
-          (needed-for-boot? #t)
-          (options (format #f "trans=virtio,cache=loose,msize=~a"
-                           %default-msize-value))
-          (check? #f))))
-
-
 ;;;
 ;;; VMs that share file systems with the host.
 ;;;
@@ -145,6 +110,12 @@ (define (mapping->file-system mapping)
        (device (file-system->mount-tag source))
        (type "9p")
        (flags (if writable? '() '(read-only)))
+
+       ;; The 9p documentation says that cache=loose is "intended for
+       ;; exclusive, read-only mounts", without additional details.  It's
+       ;; faster than the default cache=none, especially when copying and
+       ;; registering store items.  Thus, use cache=loose, except for writable
+       ;; mounts, to ensure consistency.
        (options (string-append "trans=virtio"
                                (if writable? "" ",cache=loose")
                                ",msize=" (number->string %default-msize-value)))
-- 
2.41.0





This bug report was last modified 1 year and 293 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.