also only use 16 u_shorts instead of 32 ints. Also add panic()
calls for under- and overflow of the ks_active members under
DIAGNOSTIC. The MAXBUCKET constant ended up in sys/mallocvar.h
and not sys/param.h, as the latter caused build problems.
Ride the kernel revision bump of my previous change.
per size, and make vmstat report this information under the "Memory
statistics by type" display, which is only printed when the kernel
has been compiled with KMEMSTATS defined, like this:
Memory statistics by type Type Kern
Type InUse MemUse HighUse Limit Requests Limit Limit Size(s)
wapbl 15 4192K 4192K 78644K 376426 0 0 32:0,256:3,512:6,131072:1,262144:2,524288:3
Since struct malloc_type is user-visible and is changed, bump kernel
revision to 5.99.26.
While it is true that malloc(9) is in general on the path of slowly
being replaced by kmem(9) (kmem_alloc/kmem_free), there remains a
lot of points of usage of malloc/free, and this could aid in finding
any leaks. (It helped finding the leak fixed in PR#42661.)
This was discussed with and somewhat hestitantly OKed by rmind@
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.
Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).
Discussed on <tech-kern>, reviewed by <ad>.
in "vmstat -s" output when run on the active kernel.
The reason we can't easily provide these values out of a crash
dump, is that these fields are no longer proper members of
struct uvmexp, but rather are estimated by and dependent on
the currently active page replacement policy in the kernel.
o Make "prop dictionary" fit in the "Type" coloumn
o Ensure that fields don't run into each other (adds a space between fields)
o Ensure that a Limit of >100000K fits in the field width
items, and the new large groups (for busy caches) have 62 or 63 items.
- Add PR_LARGECACHE flag as a hint that a pool_cache should use large groups.
This should be eventually be tuned at runtime.
- Report group size for vmstat -C.
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.
This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.
This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.
Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
Similarly for dkswap().
Allows code to only call one of these.
Rename struct _disk to _vminfo to be nearer its contents.
Change 'systat vm' so that it always shows the 'current' cpu times, even
after ':run' or ':boot' commands. The code in vmstat.c doesn't support :run.
split the single list of pool cache groups into three lists:
completely full, partially full, and completely empty.
use LIST instead of TAILQ where appropriate.
reduce default number of disks to 3 from 4
adjust widths of cpu stats if one of them is 100%
always put spaces between # of processes runnable (from pr 12691)
lookup and allocation, and any dependency on NPROC or MAXUSERS.
NO_PID changed to -1 (and renamed NO_PGID) to remove artificial limit
on PID_MAX.
As discussed on tech-kern.
instead of calling time(3).
This makes rate calculations of crash dumps sensible; in contrast,
subtracting the boot time of the crash dump from the current time of the
running system produces a not-very-meaningful number.
"iostat -x" now shows these (ala linux/solaris), but this is only splitting
the read/write bytes/transactions, not adding any new metrics. "systat
iostat" now has two new commands to switch between combined/separate mode
for both it's numbers & bar modes.
cpus and hz is measured in ticks per cpu, divide tick count by ncpu to
determine elapsed time since last sample.
Fixes I/O rate deflation observed on multiprocessors.
existence and value are machine-dependent, and using KERNBASE
either breaks binary compatibility across the same MACHINE_ARCH
or prevents this program from compiling at all.
some of the symbols can't be found
- Only kvm_nlist() hashnl[] and histnl[] once
- Add a description to struct kernel_hash, and print with -L
- Sort entries in khashes[]
- Don't exit on unknown hashes; just display a warning and move on
isn't generally enabled by default, and i wanted -h for something else.
- implement -h, which displays statistics for various kernel hash tables
- add deref_kptr(), which does the hard work of kvm_read() et al
- various minor cleanups