From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RRHao-0007s4-D8 for garchives@archives.gentoo.org; Fri, 18 Nov 2011 06:06:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D935C21C041; Fri, 18 Nov 2011 06:06:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A69E421C041 for ; Fri, 18 Nov 2011 06:06:21 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0DCD61B4040 for ; Fri, 18 Nov 2011 06:06:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 6743880042 for ; Fri, 18 Nov 2011 06:06:20 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <62f4438376098f20ed293fec1fec6fabc014b7ef.WilliamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/runscript.sh.in X-VCS-Directories: sh/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 62f4438376098f20ed293fec1fec6fabc014b7ef Date: Fri, 18 Nov 2011 06:06:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d547a6f7-d038-4681-8550-689d6ec5b26c X-Archives-Hash: ed4f2a3a5da0138225ddb66912fb24d5 commit: 62f4438376098f20ed293fec1fec6fabc014b7ef Author: William Hubbs gentoo org> AuthorDate: Fri Nov 18 05:49:07 2011 +0000 Commit: William Hubbs gentoo org> CommitDate: Fri Nov 18 05:55:32 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D62f44383 CGroups: finish initializing the CGroup When a CGroup is created, we need to copy cpuset.cpus and cpuset.mems from the new group's parent into the new group before we can attach any processes to it. --- sh/runscript.sh.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index ca9c133..722364a 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -194,6 +194,8 @@ if [ -d /sys/fs/cgroup/ ]; then # use RC_SVCNAME unless overridden in conf.d SVC_CGROUP=3D${rc_cgroup:-$RC_SVCNAME} mkdir -p /sys/fs/cgroup/${SVC_CGROUP} + cp /sys/fs/cgroup/cpuset.cpus /sys/fs/cgroup/${SVC_CGROUP} + cp /sys/fs/cgroup/cpuset.mems /sys/fs/cgroup/${SVC_CGROUP} # now attach self to cgroup - any children of this process will inherit= this echo $$ > /sys/fs/cgroup/${SVC_CGROUP}/tasks # TODO: set res limits from conf.d