allocating memory for them, requesting all the metadata contents of
these buffers (and repeating in the unlikely case of the number of
buffers increasing too much since the estimate) and then straight away
throwing all the contents out just to count how many buffers there were,
just get the initial estimate from the kernel and subtract the slop.
Reduces system CPU usage of "systat vm" by approx 80% for any system
with a reasonable number of buffers.
GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)
use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.
we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
and not exposed to userland, except do expose struct mount if __EXPOSE_MOUNT
is defined. define __EXPOSE_MOUNT in the kmem grovellers that want
the definition. needed for ZFS.
default, build a handful of tools as n64 so they work properly.
unfortunately, they're also static as dynamic n64 has a problem.
of these tools pstat is probably the lowest hanging fruit to convert
to sysctl. systat would be close were it not for the netstat screen,
which includes netstat itself.
the rest are difficult to perhaps foolish.
the upside is that netstat, pmap and fstat all work properly now.
message is retained, and you can't get rid of it. since it's dispalyed
in inverse, it feels like there's always an error happening (which is
really what the code has -- the above string is displayed via the error()
function.) for several types of key press that largely are just "redraw"
operation (space, ^L, etc.), clear the error string as well.
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations. Update comment describing
the locking protocol to include this.
These files were fumble-fingered out of the last commit.