On 09/09/2020 00:50, Alexander V. Chernikov wrote: > 08.09.2020, 21:03, "Andriy Gapon" <a...@freebsd.org>: >> On 22/08/2020 00:34, Alexander V. Chernikov wrote: >>> Author: melifaro >>> Date: Fri Aug 21 21:34:52 2020 >>> New Revision: 364465 >>> URL: https://svnweb.freebsd.org/changeset/base/364465 >>> >>> Log: >>> Make net.fibs growable. >>> >>> Allow to dynamically grow the amount of fibs in each vnet. >>> >>> This change alters current behavior. Currently, if one defines >>> ROUTETABLES > 1 in the kernel config, each vnet will be created >>> with the number of fibs defined in the kernel config. >>> After this commit vnets will be created with fibs=1. >>> >>> Dynamic net.fibs is not compatible with net.add_addr_allfibs. >>> The plan is to deprecate the latter and make >>> net.add_addr_allfibs=0 default behaviour. >>> >>> Reviewed by: glebius >>> Relnotes: yes >>> Differential Revision: https://reviews.freebsd.org/D26062 >> >> I wonder why no one reported a problem that I am seeing after upgrading past >> this revision. Maybe because I do have net.fibs=2 in my loader.conf? > Hi Andriy, > > Does r365475 fix the problem for you? > CTLFLAG_RWTUN flag got slipped through the cracks somewhere :-(
I am not sure that it does, I haven't tried it, but I agree with Ryan's comment. In general, I would keep CTLFLAG_RWTUN as the knob is a tunable indeed and some tools query that flag. So, I would like to re-iterate my earlier suggestion to use CTLFLAG_NOFETCH paired with explicit TUNABLE_INT_FETCH (which seems to be there already). >> The problem -- unfortunately I only have a screenshot -- but it's a page >> fault >> trap in this call chain: >> sysctl_register_all -> sysctl_load_tunable_by_oid_locked -> sysctl_fibs -> >> _sx_xlock. >> >> The crash is on the RTABLES_LOCK() line. >> And it's kind of obvious why. >> >> The tunables, including net.fibs which is declared as RWTUN, are set at >> SI_SUB_TUNABLES stage, but RTABLES_LOCK_INIT() is not called until >> SI_SUB_PROTO_DOMAIN much later. In other words, sysctal_fibs can be called >> earlier than vnet_rtables_init. >> >> I think that the best way to handle the problem would be to add >> CTLFLAG_NOFETCH >> to the sysctl declaration and then to add -- if necessary at all -- an >> explicit >> query of the kenv. >> >> -- >> Andriy Gapon -- Andriy Gapon _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"