From owner-freebsd-current Thu Apr 26 17:16:30 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 2C0BF37B42C for ; Thu, 26 Apr 2001 17:16:26 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f3R0GDG59699; Thu, 26 Apr 2001 17:16:13 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200104262310.QAA29635@usr05.primenet.com> Date: Thu, 26 Apr 2001 17:15:35 -0700 (PDT) From: John Baldwin To: Terry Lambert Subject: Re: PATCH to make maxfiles, maxfiles per proc boot-time tunable Cc: terry@lambert.org, current@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 26-Apr-01 Terry Lambert wrote: > ] The problem is that param.c is *not* included in gensetdefs scope. > ] Therefore linker set entries (ie: SYSINIT etc) are not executed. TUNABLE* > ] entries in param.c are simply not called or used. > ] > ] SYSTEM_OBJS= locore.o setdef0.o vnode_if.o ${OBJS} ioconf.o param.o > config.o \ > ] setdef1.o hack.So > ] ... > ] setdef0.c setdef1.c setdefs.h: ${OBJS} > ] @gensetdefs ${OBJS} > ] > ] param.o is not included in ${OBJS}. I dont see how this patch can work > ] as-is. > > Has this changed in -current? > > I'm running on 4.3-RELEASE (now), and it has no problems. > > Are you sure you aren't linking param.o into your kernel anywhere? > > It's the linker that does the magic, not anything else (as you know); > I can assure you it's running fine on my 4.3 box. Umm, tunable_int sets up a sysinit to do the setting of the variable. This depends on there being a linker set for the sysinit code to see. Hmmm *checks link order*. Ok, param.o is in between setdef0.o and setdef1.o so it does get included in the linker set ok, but gensetdefs doesn't see it, so the count of the number of items in a linker set is bogus and invalid. If the code depends on that count then the sysinit's in param.o will be ignored. If the code just keeps walking down the set until it hits the NULL entry at the end, it will work. Hmm, looking at the bubble sort in mi_startup(), it runs until it hits NULL and doesn't check the linker set count, which is why tunable's in param.c works, even though it is incorrect. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message