Date: Thu, 19 Jun 2014 07:40:24 +0200 From: Hans Petter Selasky <hps@selasky.org> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: [RFC] Huge sysctl patch for the kernel coming - work in progress Message-ID: <53A277C8.3040603@selasky.org> In-Reply-To: <201406181713.06579.jhb@freebsd.org> References: <53A179D5.8020604@selasky.org> <201406180944.17762.jhb@freebsd.org> <53A1F848.2020902@selasky.org> <201406181713.06579.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A277C8.3040603>