[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: Add control group file systems.
From: |
David Thompson |
Subject: |
02/02: gnu: Add control group file systems. |
Date: |
Fri, 19 Jun 2015 12:09:02 +0000 |
davexunit pushed a commit to branch master
in repository guix.
commit 727636aaf88db0de3c918dcd84c907e6407f8f50
Author: David Thompson <address@hidden>
Date: Thu Jun 18 20:40:57 2015 -0400
gnu: Add control group file systems.
* gnu/system/file-systems.scm (%control-groups): New variable.
(%base-file-system): Include control group file systems.
---
gnu/system/file-systems.scm | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index db861ba..05c77fe 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -39,6 +39,7 @@
%pseudo-terminal-file-system
%devtmpfs-file-system
%immutable-store
+ %control-groups
%base-file-systems
@@ -152,13 +153,31 @@ file system."
(check? #f)
(flags '(read-only bind-mount))))
+(define %control-groups
+ (cons (file-system
+ (device "cgroup")
+ (mount-point "/sys/fs/cgroup")
+ (type "tmpfs")
+ (check? #f))
+ (map (lambda (subsystem)
+ (file-system
+ (device "cgroup")
+ (mount-point (string-append "/sys/fs/cgroup/" subsystem))
+ (type "cgroup")
+ (check? #f)
+ (options subsystem)
+ (create-mount-point? #t)))
+ '("cpuset" "cpu" "cpuacct" "memory" "devices" "freezer"
+ "blkio" "perf_event" "hugetlb"))))
+
(define %base-file-systems
;; List of basic file systems to be mounted. Note that /proc and /sys are
;; currently mounted by the initrd.
- (list %devtmpfs-file-system
- %pseudo-terminal-file-system
- %shared-memory-file-system
- %immutable-store))
+ (append (list %devtmpfs-file-system
+ %pseudo-terminal-file-system
+ %shared-memory-file-system
+ %immutable-store)
+ %control-groups))