From owner-freebsd-rc@FreeBSD.ORG Thu Jan 7 19:31:38 2010 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 198C5106566B for ; Thu, 7 Jan 2010 19:31:38 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id CDFDB8FC08 for ; Thu, 7 Jan 2010 19:31:37 +0000 (UTC) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id E4C5119E045 for ; Thu, 7 Jan 2010 20:31:36 +0100 (CET) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 3D9A619E046 for ; Thu, 7 Jan 2010 20:31:28 +0100 (CET) Message-ID: <4B46368F.3050606@quip.cz> Date: Thu, 07 Jan 2010 20:31:27 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.6) Gecko/20091206 SeaMonkey/2.0.1 MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: cpuset, setfib and other features (not) supported by rc.subr X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 19:31:38 -0000 Hi, I would like to discuss adding general support in to rc.subr for things like cpuset, setfib etc. FreeBSD has some useful features (compared to other OSes) but those are not generally supported by rc.subr. For example setfib support is added (reinvented again and again) on per rc script basis in base rc scripts and in ports rc scripts too. cpuset has no support at all. I think that adding support in rc.subr is the right way to do things like this. Then these features will be available to all (or most of) rc scripts without need to modify them and these feature will become more used by more people. I created patch for cpuset: conf/142434: [patch] Add cpuset(1) support to rc.subr http://www.freebsd.org/cgi/query-pr.cgi?pr=142434 There is also patch for setfib: conf/132483: rc.subr(8) [patch] setfib(1) support for rc.subr http://www.freebsd.org/cgi/query-pr.cgi?pr=132483 patch for rtprio: conf/99444: [patch] Enhancement: rc.subr could easily support starting some daemons with realtime priorities http://www.freebsd.org/cgi/query-pr.cgi?pr=99444 conf/123222: [patch] Add rtprio(1)/idprio(1) support to rc.subr(8) http://www.freebsd.org/cgi/query-pr.cgi?pr=123222 Or more general way to use "any" wrapper for starting services conf/88913: [patch] wrapper support for rc.subr http://www.freebsd.org/cgi/query-pr.cgi?pr=88913 All these patches are very similar. I tested just my own patch for cpuset and found that there is some edge case where it is not working - rc.d/jail. It is becaues of the nature how rc.d/jail works - it starts jails by internal command in a loop instead of rc.subr things, so it will not use cpuset for jails, but nothing goes wrong. I did not tested something using _chroot as I did not found any rc script with it. What are the objections to not use / commit things like patches above? Do you think it is not the right way to have these features included in rc.subr and is better to write it in each rc script separately? Or is there any other problem with general use of setfib and cpuset? I think setfib and cpuset can be useful for all daemons and jails started by rc scripts. Especially cpuset on newer machines with more and more CPU cores and setfib for network daemons with profiles like Apache (currently Apache has its own implementation in rc script) Miroslav Lachman