From owner-freebsd-current@FreeBSD.ORG Mon Jun 13 06:59:02 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FD561065673; Mon, 13 Jun 2011 06:59:02 +0000 (UTC) (envelope-from eirnym@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 77F628FC08; Mon, 13 Jun 2011 06:59:01 +0000 (UTC) Received: by bwz12 with SMTP id 12so5131098bwz.13 for ; Sun, 12 Jun 2011 23:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=7qVSKGDFdk2JLH0nNAfEFFu9nDSkVUAhIF1KrBDArcM=; b=U2wGt06bGNtMdJUvnmSgU2S16yHyjSMT7JjwMNdtcnKvmcHCkGQl+UybI9Peby2oXW 5c6da2V+9MgKvU+wnRm7t9QTxrQ1fBj18dPtopLzXzteH5ADlHTbrdrrRgBQ8eHf61QN 3zfYK2MqzYyylgd3A+OtiXPg5Z7f2zANK6jIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=vkfO8My1YIoFIjzYoNkANFoFGvHO0OskdF1nZDcv6C0TUxi62egpoZxylyzKofEDgs i3aCeeuJ+KhumtOjAKjfpfMrTHoUDIxFKpy6XaJ8kZgzqS5WsJxCGO8gojx3MjgjYnQS ZF8zOxknp8w+FRXKUizjPK6GIcHpYOW9rMy30= Received: by 10.204.19.83 with SMTP id z19mr4368704bka.191.1307948340168; Sun, 12 Jun 2011 23:59:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.15.74 with HTTP; Sun, 12 Jun 2011 23:58:39 -0700 (PDT) In-Reply-To: References: <4DF3E98B.40108@FreeBSD.org> From: Eir Nym Date: Mon, 13 Jun 2011 06:58:39 +0000 Message-ID: To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , freebsd-current@freebsd.org Subject: Re: rc.d script to load kernel modules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2011 06:59:02 -0000 On 13 June 2011 06:32, Garrett Cooper wrote: > On Sun, Jun 12, 2011 at 11:11 PM, Eir Nym wrote: >> On 11 June 2011 22:17, Doug Barton wrote: >>> Howdy, >>> >>> Per discussion on -arch and the svn list about improving boot time and >>> stripping down the kernel to just that-which-cannot-be-modularized I cr= eated >>> the attached script to kldload modules that don't need to be in loader.= conf. >>> It cut quite a bit of time off my boot, so hopefully it will be useful = to >>> others as well. >>> >>> To use it just put everything that is being _load'ed in loader.conf int= o >>> kld_list in rc.conf[.local]. For example, mine has: >>> >>> kld_list=3D'umass coretemp ichwd linux nvidia if_wpi' >>> >>> If there is agreement that this is a good direction to go I'll be happy= to >>> commit this along with the relevant /etc/defaults/rc.conf and rc.conf.5 >>> changes. >>> >> >> How do you would suggest set tunables, which are readonly or have no >> sysctl(8) equivalent after boot-time? AFAIK loader can't set tunable >> if module is not loaded at boot-time. > > =C2=A0 =C2=A0Not true. Kernel tunables are really not that different (in > concept) from kernel-level environment variables. Certainly, they > would have less value if one's loading modules at boot (depending when > things are done -- i.e. how closely the sysctl pseudo service is run > to the proposed kld pseudo service), but sysctls can't be set until > the module (or respective OID leaf) has been created by the kernel > (somehow, i.e. via driver initialization, etc). > Thanks, > -Garrett > I see, I use tunables and it will be great if I can add tunables for module while load them from user space with rc(8).