all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 2/2] gnu: Add control group file systems.
@ 2015-06-19  0:44 David Thompson
  2015-06-19 11:43 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: David Thompson @ 2015-06-19  0:44 UTC (permalink / raw)
  To: guix-devel

[-- 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] gnu: Add control group file systems.
  2015-06-19  0:44 [PATCH 2/2] gnu: Add control group file systems David Thompson
@ 2015-06-19 11:43 ` Ludovic Courtès
  2015-06-19 11:47   ` Thompson, David
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-06-19 11:43 UTC (permalink / raw)
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> skribis:

> 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.

LGTM!

I assume none of these requires special kernel modules, right?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] gnu: Add control group file systems.
  2015-06-19 11:43 ` Ludovic Courtès
@ 2015-06-19 11:47   ` Thompson, David
  0 siblings, 0 replies; 3+ messages in thread
From: Thompson, David @ 2015-06-19 11:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Fri, Jun 19, 2015 at 7:43 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> David Thompson <dthompson2@worcester.edu> skribis:
>
>> 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.
>
> LGTM!
>
> I assume none of these requires special kernel modules, right?

I don't think.  All of the mount points worked perfectly when tested
with 'guix system vm'.

- Dave

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-19 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19  0:44 [PATCH 2/2] gnu: Add control group file systems David Thompson
2015-06-19 11:43 ` Ludovic Courtès
2015-06-19 11:47   ` Thompson, David

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.