From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH 2/2] gnu: Add control group file systems. Date: Thu, 18 Jun 2015 20:44:27 -0400 Message-ID: <87oakcil1w.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5kQ1-00061e-VK for guix-devel@gnu.org; Thu, 18 Jun 2015 20:44:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5kQ0-0000CG-Tq for guix-devel@gnu.org; Thu, 18 Jun 2015 20:44:29 -0400 Received: from mail.fsf.org ([208.118.235.13]:38121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5kQ0-0000C7-QE for guix-devel@gnu.org; Thu, 18 Jun 2015 20:44:28 -0400 Received: from 209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.40.86]:44504 helo=izanagi) by mail.fsf.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Z5kQ0-0000Ge-Bc for guix-devel@gnu.org; Thu, 18 Jun 2015 20:44:28 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-control-group-file-systems.patch >From 339bc3a744ad07f8513fbbf4b1cfd7955fdf7f1d Mon Sep 17 00:00:00 2001 From: David Thompson 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)) -- 2.2.1 --=-=-= Content-Type: text/plain -- David Thompson GPG Key: 0FF1D807 --=-=-=--