Updated the kmemzones logic such that the ks_size bitmap can be used as an
index into it to report the size of the zone used.
Create the kern.malloc sysctl which replaces the kvm mechanism to report
similar data. This will provide an easy place for statistics aggregation if
malloc_type statistics become per cpu data.
Add some code ifdef'd under MALLOC_PROFILING to facilitate a tool for sizing
the malloc buckets.
to unsigned long long.
Don't be too overzealous with the printing of ks_calls in the total
statistics, cut back from 20 to 13 positions to print (which should last
a couple of years easily (20 digits is enough for 3168 years of calls at a
measly billion (10^9) calls per second.)).
Submitted by: bde
make sense to me) and change the printf argument from %8ld to %20llu to
accompany the printing of the totals.
Realigned the header printed above it as well.
PR: 32342
Submitted by: ryan beasley <ryanb@goddamnbastard.org>
Reviewed by: jeff, Tim J Robbins
hold a 64bit or 32bit ~0 value, i.e. 20 and 10; this anticipates
soon-to-be machines with Exahertz rtc interrupt frequencies. :-)
PR: bin/16206
Submitted by: John Capo <jc@irbs.com>
MFC after: 1 week
columns confuse the heck out of other apps trying to parse vmstat output
(eg sscope). I made sure we're still <= 80 cols per line.
Fixed warnings about unused vars and printf %format mismatches.
Requested by: Eugene Aleynikov <eugenea@infospace.com>
Reviewed by: joerg (implicitly)
MFC after: 2 weeks
which is slightly less than 4GB. To use a quote from someone who shall
remain nameless "No one will ever need more than 4 GB" :-) But FreeBSD
is prepared if we one day will.
Requested by: Eugene Aleynikov <eugenea@infospace.com>
Submitted by: Maxim Konovalov <maxim@macomnet.ru>
Silence a warning by renaming the 'pgtok' #define to 'vmstat_pgtok' so
as not to conflict with the 'pgtok' #define in sys/param.h
is ultimately silly because no locks are held in user space while traversing
the list via kvm_reads... really, this should use the sysctl interface
which *is* protected by a lock in the kernel.
the magicness of 200. Cleaned up the remaining parts. Circularisation
of the list of malloc types was a kernel bug (now fixed). Interfering
with applications' definitions of pgtok is a system header bug (not
fixed).
changed from a simple list to a circular one. We compensate by only
looping until we see the first address again. Before, things would
terminate because it was limited to 200 iterations. This lead to
bogus statistics and repeating stats for memory types.
This should be merged into 3.2, as the same bug is there.
I'm not sure why we have `mvstat -z'. `sysctl vm.zone' gives more
information. OTOH, `sysctl vm.zone' shouldn't return ASCII data,
and reporting of memory use should be integrated, at least as an
option.
the display wrapped around.
This decreases the default maximum number of disks shown to 2, so things
don't wrap around so easily. Also, it fixes the header display issues.
Submitted by: Bruce Evans <bde@FreeBSD.ORG>
peripheral drivers can determine where in the devstat(9) list they are
inserted.
This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and
any ports that depend on the devstat code, since the size of the devstat
structure has changed. The devstat version number has been incremented as
well to reflect the change.
This sorts devices in the devstat list in "more interesting" to "less
interesting" order. So, for instance, da devices are now more important
than floppy drives, and so will appear before floppy drives in the default
output from systat, iostat, vmstat, etc.
The order of devices is, for now, kept in a central table in devicestat.h.
If individual drivers were able to make a meaningful decision on what
priority they should be at attach time, we could consider splitting the
priority information out into the various drivers. For now, though, they
have no way of knowing that, so it's easier to put them in an easy to find
table.
Also, move the checkversion() call in vmstat(8) to a more logical place.
Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and
for putting up with the long time it has taken me to commit it. Bruce did
object somewhat to the central priority table (he would rather the
priorities be distributed in each driver), so his objection is duly noted
here.
Reviewed by: bde, obrien
generation was causing unaligned access faults on the Alpha.
I have incremented the devstat version number, since this is an interface
change. You'll need to recompile libdevstat, systat, iostat, vmstat and
rpc.rstatd along with your kernel.
Partially Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>