From owner-freebsd-current@FreeBSD.ORG Thu Jun 19 05:40:08 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D393D18C; Thu, 19 Jun 2014 05:40:08 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9229528EA; Thu, 19 Jun 2014 05:40:07 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 029E61FE026; Thu, 19 Jun 2014 07:40:04 +0200 (CEST) Message-ID: <53A277C8.3040603@selasky.org> Date: Thu, 19 Jun 2014 07:40:24 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: [RFC] Huge sysctl patch for the kernel coming - work in progress References: <53A179D5.8020604@selasky.org> <201406180944.17762.jhb@freebsd.org> <53A1F848.2020902@selasky.org> <201406181713.06579.jhb@freebsd.org> In-Reply-To: <201406181713.06579.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 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: Thu, 19 Jun 2014 05:40:08 -0000 On 06/18/14 23:13, John Baldwin wrote: > On Wednesday, June 18, 2014 4:36:24 pm Hans Petter Selasky wrote: >> On 06/18/14 15:44, John Baldwin wrote: >>> On Wednesday, June 18, 2014 7:36:53 am Hans Petter Selasky wrote: >>>> Hi, >> >> I'll probably put it into the tree next week. > > I think having CTLFLAG_TUN do this by default is probably correct in the > long term. The vast majority of places that use a tunable to prime a sysctl > are safe. Why not do this for the initial patch: > > - Add your change to auto-fetch values when CTLFLAG_TUN is set. > - Instead of adding a CTLFLAG_FETCH, add a CTLFLAG_NOFETCH to disable > getenv(). > - Make a pass over the existing places that use CTLFLAG_TUN seeing which > ones are safe (so TUNABLE_* can just be removed), and which ones aren't > (in which case add CTLFLAG_NOFETCH). > > Followup changes can work on converting other places that don't currently > use CTLFLAG_TUN but have a SYSCTL + TUNABLE to use CTLFLAG_TUN instead as > well as fixing places that use CTLFLAG_NOFETCH to not need them. > > I would suggest you commit some of the style changes (like using explicit > initializers in SYSCTL_OID()) as a separate change beforehand. > Hi, See: http://svnweb.freebsd.org/changeset/base/267633 And updated patch: http://home.selasky.org:8192/sysctl_tunable.diff --HPS