kernel - Upgrade buffer space tracking variables from int to long * Several bufspace-related buffer cache parameters can now overflow a 32 bit integer on machines with large amounts (~64G+) of memory. Change these to long. bufspace, maxbufspace, maxbufmallocspace, lobufspace, hibufspace, lorunningspace, hirunningspace, dirtybufspace, dirtybufspacehw, runningbufspace, lodirtybufspace, hidirtybufspace. * Also requires an API change to libkcore/libkinfo which effects top.
buildworld - Fix breakage * Fix some _KERNEL_STRUCTURES breakage. This isn't a fantastic solution but it works. Reported-by: swildner
Networking routing statistics on a per-CPU basis: (a) sysctl node net.route introduced. (b) sysctl leaf node net.route.stats can be used for retrieving a cpu indexed array of struct rtstatistics. (a) add a function kinfo_get_net_rtstatistics(3), which will be responsible for providing an aggregated view of the routing statistics; part of libkinfo(3). (d) adapt netstat(8) to make use of the new libkinfo interface for retrieving routing statistics. Discussed-with: Jeffrey Hsu <hsu at dragonflybsd.org> (long time ago)
KINFO library cleanups: (a) stop including <sys/param.h> from kinfo_pcpu.h and kinfo.h (b) remove useless include guards (c) use _DIAGASSERT for enforcing interface requirements (d) substitute use of relloc(3) with reallocf(3) to guard from memory leaks. Requested-by: Joerg Sonnenberger <joerg@britannica.bec.de>
Adapt the KINFO library to aggregate per-cpu cputime statistics. (a) add a framework for aggregating per-cpu structures, of variant field types; this interface will undergo change once it is formalised upon, kinfo_pcpu.[ch]. (b) minor style(9) cleanups while I am around these ends. (c) adjust libkcore, this might not be fully correct but it fetches the right symbol at the least, it is not so easy to collect per-cpu statistics from core files without doing magic with the CPU privatespace like how we do in GDB debug scripts. (d) kinfo_get_sched_cputime(3) is fetching aggregate statistics to retain behavior, most programs do not care about per-cpu stats without getting really mucky anyway; (discussed with joerg)
Add new structures for exporting the cputime statistics via 64 bit counters and redo the timer frequence export. Provide the interface glue for libkinfo and libkcore. Additionally provide interfaces to query ccpu, the number of cpus, tk_nin and tk_nout. Remove those fields from devstat.h's struct statinfo. Remove kvm dependency of rpc.rstatd by using the newly added libkinfo functions and the sysctl interface for vmmeter. Use the new interface in systat, the iostat part is now kvm-free. Use kinfo_get_sched_stathz in time. Use the kinfo interface for everything beside getting the actual process list in top. This also removes the Last PID, which could be added back easily. Since the feature is not that useful and breaks e.g. the jail isolation, I haven't added a sysctl to read nextpid. Use the kinfo interface in vmstat. Use the kinfo interface in iostat. iostat is now kvm-free and not setgid kmem anymore. This also means that iostat can't be applied to coredump anymore. If this functionality is important, the kcore kinfo wrapper can be added easily.
Add a new system library, libkinfo. It is intended to replace libkvm for most userland tools, which want to deal with a living kernel, not post-mortem analysation. Change the kern.file backing from a struct file array to a struct kinfo_file array. The later is an independent structure, which includes the information useful for userland. This allows changing the kernel-internals without having to recompile libkinfo and derived programs. This is inspired by the changes DES did in FreeBSD 5 (struct xfile). Partly-obtained-from: FreeBSD (kern_descrip.c changes)