From: David Thompson <dthompson2@worcester.edu>
To: guix-devel@gnu.org
Subject: [PATCH 2/2] gnu: Add control group file systems.
Date: Thu, 18 Jun 2015 20:44:27 -0400 [thread overview]
Message-ID: <87oakcil1w.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0002-gnu-Add-control-group-file-systems.patch --]
[-- Type: text/x-patch, Size: 1999 bytes --]
From 339bc3a744ad07f8513fbbf4b1cfd7955fdf7f1d Mon Sep 17 00:00:00 2001
From: David Thompson <davet@gnu.org>
Date: Thu, 18 Jun 2015 20:40:57 -0400
Subject: [PATCH 2/2] 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 file 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))
\f
--
2.2.1
[-- Attachment #2: Type: text/plain, Size: 38 bytes --]
--
David Thompson
GPG Key: 0FF1D807
next reply other threads:[~2015-06-19 0:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 0:44 David Thompson [this message]
2015-06-19 11:43 ` [PATCH 2/2] gnu: Add control group file systems Ludovic Courtès
2015-06-19 11:47 ` Thompson, David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oakcil1w.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me \
--to=dthompson2@worcester.edu \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).