Date: Mon, 1 Dec 2014 07:45:03 -0800 From: Alfred Perlstein <bright@mu.org> To: Hans Petter Selasky <hps@selasky.org> Cc: "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, Alfred Perlstein <alfred@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, John Baldwin <jhb@freebsd.org> Subject: Re: svn commit: r275136 - in head/sys: dev/e1000 dev/ixgbe kern sys Message-ID: <EB6CB885-C5B2-4D7C-A502-18A4E8F5EF40@mu.org> In-Reply-To: <547C8CA2.8040305@selasky.org> References: <201411262019.sAQKJaw4043557@svn.freebsd.org> <39377603.10OyiSzjWY@ralph.baldwin.cx> <872C180A-6ADD-469F-A801-3728DF134EEC@mu.org> <547C88A9.1070007@selasky.org> <5E1B6CD4-BBA7-4AD0-9982-E981015AF138@mu.org> <547C8A9C.4080603@selasky.org> <F621EBD1-C330-456A-B130-A2F46B5F8355@mu.org> <547C8CA2.8040305@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Dec 1, 2014, at 7:43 AM, Hans Petter Selasky <hps@selasky.org> wrote: >=20 >> On 12/01/14 16:39, Alfred Perlstein wrote: >>=20 >>=20 >>>> On Dec 1, 2014, at 7:34 AM, Hans Petter Selasky <hps@selasky.org> wrote= : >>>>=20 >>>> On 12/01/14 16:29, Alfred Perlstein wrote: >>>>=20 >>>>=20 >>>>>> On Dec 1, 2014, at 7:26 AM, Hans Petter Selasky <hps@selasky.org> wro= te: >>>>>>=20 >>>>>> On 12/01/14 16:19, Alfred Perlstein wrote: >>>>>> It makes little sense to have a rw sysctl that only takes effect "som= e times". This violates POLA at the expense of making code appear cleaner. E= xpectation is that writable sysctls take >>>>>=20 >>>>> Hi, >>>>>=20 >>>>> I think you are missing a new feature in 11-current, that if you add "= CTLFLAG_TUN" to even dynamic sysctls, they get initialized from the envirome= nt, if any. That way you can just skip the TUNABLE_INT_FETCH() stuff! >>>>=20 >>>> Ok I can probably switch to that. >>>>=20 >>>> Any objection if I mfc this feature to -stable if it does what I need? >>>=20 >>> Hi, >>>=20 >>> No objections from me at least, but it might require some work from your= side, because there was a lot of cleanup about removing duplicate definitio= ns, like static SYSCTLS which have already CTLFLAG_TUN and a TUNABLE fetch s= tatement, which makes the variable init twice. Just look at the revision his= tory for "kern/kern_sysctl.c" in 11-current. >>>=20 >>> --HPS >>=20 >> One question though... For the global sysctl for all nodes.... >>=20 >> When is the var fetched? If it's before SI_SUB_CPU it is not useful. >=20 > Hi, >=20 > It is quite early, actually: >=20 > SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_register_all, 0); >=20 > In some parts of the machine independent, MI, code you neee to keep the TU= NABLE_FETCH'es, because its run before SI_SUB_KMEM ! Then it will not work unless I move the global n_queues sysctl creation into= the driver's mod load function.=20 Is that ok? >=20 > --HPS >=20 >=20 >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EB6CB885-C5B2-4D7C-A502-18A4E8F5EF40>