From owner-freebsd-current@FreeBSD.ORG Thu Jun 11 04:07:57 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55402748 for ; Thu, 11 Jun 2015 04:07:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery4.ore.mailhop.org (pmta2.delivery4.ore.mailhop.org [54.200.247.200]) by mx1.freebsd.org (Postfix) with SMTP id 3448E1A9B for ; Thu, 11 Jun 2015 04:07:56 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 11 Jun 2015 04:07:56 +0000 (UTC) Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t5B47sqv005555; Wed, 10 Jun 2015 22:07:54 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1433995674.1200.399.camel@freebsd.org> Subject: Re: setting tunables in stable/10 vs head? From: Ian Lepore To: hiren panchasara Cc: Rick Macklem , freebsd current Date: Wed, 10 Jun 2015 22:07:54 -0600 In-Reply-To: <20150611034445.GB4757@strugglingcoder.info> References: <1249942556.55526194.1433967239788.JavaMail.root@uoguelph.ca> <20150611034445.GB4757@strugglingcoder.info> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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, 11 Jun 2015 04:07:57 -0000 On Wed, 2015-06-10 at 20:44 -0700, hiren panchasara wrote: > On 06/10/15 at 04:13P, Rick Macklem wrote: > > Hi, > > > > I just MFC'd a patch from head to stable/10 that defines some > > tunables using CTLFLAG_RDTUN. Although the MFC didn't break > > anything, the tunables don't get changed by the values in /boot/loader.conf. > > > > By applying a patch like this: > > SYSCTL_DECL(_vfs_nfsd); > > int nfsrv_statehashsize = NFSSTATEHASHSIZE; > > +TUNABLE_INT("vfs.nfsd.statehashsize", &nfsrv_statehashsize); > > SYSCTL_INT(_vfs_nfsd, OID_AUTO, statehashsize, CTLFLAG_RDTUN, > > &nfsrv_statehashsize, 0, > > "Size of state hash table set via loader.conf"); > > > > they get set ok. > > > > So, is this correct or have I done something stupid? > > I believe that is correct. hans changed how they are declared with r267961 > and now you do not need TUNABLE_INT() on -head. > > > > And, if it correct, do I commit a patch like the above directly > > to stable/10. (It seems that TUNABLE_INT() is discouraged for -head.) > > That's the correct way, afaik. > > Cheers, > Hiren Is there a reason the sysctl tunable flag changes can't be MFC'd? Leaving changes that widespread un-mfc'd just makes for lots of merge conflicts as time goes on (and can also lead to merged code behaving differently than expected). -- Ian