Subject: MAXSLP (somewhat related to KL* removal)
To: None <tech-kern@NetBSD.org>
From: Erik Bertelsen <email@example.com>
Date: 01/26/2000 20:43:33
Today's sup broke building kernels on mac68k because the definition of
MAXSLP was unintentionally (I guess) removed from mac68k/include/vmparam.h while
removing the KL* macros from all ports.
MAXSLP is only used in uvm/uvm_meter.c.
First observation: This must be rectified, eg. by reinstating the following
deleted text in mac68k/include/vmparam.h:
< * The time for a process to be blocked before being very swappable.
< * This is a number of seconds which the system takes as being a non-trivial
< * amount of real time. You probably shouldn't change this;
< * it is used in subtle ways (fractions and multiples of it are, that is, lik
< * half of a ``long time'', almost a long time, etc.)
< * It is related to human patience and other factors which don't really
< * change over time.
< #define MAXSLP 20
Second observation: All ports for which I have sources define MAXSLP identically,
find . -name '*.[chsS]' | xargs grep MAXSLP
./arch/i386/include/vmparam.h:#define MAXSLP 20
./arch/mips/include/vmparam.h:#define MAXSLP 20
./arch/powerpc/include/vmparam.h:#define MAXSLP 20
./arch/ofppc/include/vmparam.h:#define MAXSLP 20
./arch/sparc/include/vmparam.h:#define MAXSLP 20
./arch/macppc/include/vmparam.h:#define MAXSLP 20
./uvm/uvm_meter.c:int maxslp = MAXSLP; /* patchable ... */
If MAXSLP is really 20 on all ports ranging in performance from Vax's via
mac68k's to PPC's and Alphas and modern i386's, why not define it in a MI
header instead of duplicating the definition in a zillion of MD headers?
Third observation: I wonder why it is present in the powerpc version of vmparam.h
as well as the specific machines, e.g. ofppc and macppc? This feels redundant
and suspicious to me, even more as powerpc/vmparam.h does not seem to be used
by macppc/* at all. Should powerpc/include/vmparam.h be nuked ?