From owner-freebsd-current Tue Mar 10 15:42:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA00829 for freebsd-current-outgoing; Tue, 10 Mar 1998 15:42:22 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA00808 for ; Tue, 10 Mar 1998 15:42:09 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id XAA05026; Tue, 10 Mar 1998 23:42:03 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id AAA13794; Wed, 11 Mar 1998 00:42:03 +0100 (MET) Message-ID: <19980311004202.49594@follo.net> Date: Wed, 11 Mar 1998 00:42:02 +0100 From: Eivind Eklund To: ade@demon.net, Eivind Eklund Cc: current@FreeBSD.ORG Subject: Re: panics with SMP and NFS References: <19980310235506.04127@follo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: ; from Ade Lovett on Tue, Mar 10, 1998 at 05:32:47PM -0600 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Mar 10, 1998 at 05:32:47PM -0600, Ade Lovett wrote: > Eivind Eklund writes: > > > >> Peeking at the code, it seems that this panic (and a bunch of other > >> stuff) is only called if MAX_PERF is undefined -- sadly, no mention > >> of MAX_PERF is made in any of the kernel config files (even LINT). > > > >I'll check with John and possibly add this as a commented out option > >in LINT. > > I'm just wondering how many other undocumented (at least, not > mentioned in LINT) #ifdef's there are in the sys/ tree... There are somewhere between 500 and 600 unmentioned symbols that are checked by #if defined/#if !defined/ifdef/ifndef statements. > Would it be useful if I did a scan over the current tree and produced > a list of such "missing" options? There isn't too much point in you going over them, as I've already got a list, produced by the following little script and a little pipe with awk, sort and uniq. #!/usr/local/bin/perl use strict; my %symbols; my $key; while (<>) { if (/^[ \t]*\#[ \t]*ifn?def[ \t]+([A-Za-z_][A-Za-z_0-9]*)/) { $symbols{$1} = 1; } elsif (/[ \t]*\#[ \t]*if[ \t]/) { while (/defined[ \t]*\([ \t]*([A-Za-z_][A-Za-z_0-9]*)/g) { $symbols{$1} = 1; } } } foreach $key (sort keys %symbols) { print "$key\n"; } However, if you want to help me _remove_ the ifdefs, you're more than welcome. I committed a lengthy comment describing the preferred state of affairs to conf/options earlier today; a non-mentioned point is that options should generally go away, and be replaced with sysctls or smarter code. I'll accept patches to this effect, and make sure they're reviewed and either committed or rejected (with the reasons why) fairly quickly. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message