freebsd-nq/sys
Poul-Henning Kamp 7194d335cf Run a revision of the devstat interface:
Kernel:

Change statistics to use the *uptime() timescale (ie: relative to
boottime) rather than the UTC aligned timescale.  This makes the
device statistics code oblivious to clock steps.

Change timestamps to bintime format, they are cheaper.

Remove the "busy_count", and replace it with two counter fields:
"start_count" and "end_count", which are updated in the down and
up paths respectively.  This removes the locking constraint on
devstat.

Add a timestamp argument to devstat_start_transaction(), this will
normally be a timestamp set by the *_bio() function in bp->bio_t0.
Use this field to calculate duration of I/O operations.

Add two timestamp arguments to devstat_end_transaction(), one is
the current time, a NULL pointer means "take timestamp yourself",
the other is the timestamp of when this transaction started (see
above).

Change calculation of busy_time to operate on "the salami principle":
Only when we are idle, which we can determine by the start+end
counts being identical, do we update the "busy_from" field in the
down path.  In the up path we accumulate the timeslice in busy_time
and update busy_from.

Change the byte_* and num_* fields into two arrays: bytes[] and
operations[].

Userland:

Change the misleading "busy_time" name to be called "snap_time" and
make the time long double since that is what most users need anyway,
fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same
timescale as the kernel fields.

Change devstat_compute_etime() to operate on struct bintime.

Remove the version 2 legacy interface: the change to bintime makes
compatibility far too expensive.

Fix a bug in systat's "vm" page where boot relative busy times would
be bogus.

Bump __FreeBSD_version to 500107

Review & Collaboration by:	ken
2003-03-15 21:59:06 +00:00
..
alpha Grab Giant around calls to contigmalloc() and contigfree() so 2003-03-13 17:18:48 +00:00
amd64 Grab Giant around calls to contigmalloc() and contigfree() so 2003-03-13 17:18:48 +00:00
arm
boot FreeBSD 5.0 has stopped shipping /modules 2.5 years ago. Catch 2003-03-11 12:09:25 +00:00
cam Run a revision of the devstat interface: 2003-03-15 21:59:06 +00:00
coda Set f_fstypename in coda_nb_statfs(). 2003-03-07 09:18:15 +00:00
compat - Change the linux_[gs]et_os{name, release, s_version}() functions to 2003-03-13 22:45:43 +00:00
conf o add crypto driver glue for using the new rndtest driver/module; this is 2003-03-11 22:47:06 +00:00
contrib Centralize the devstat handling for all GEOM disk device drivers 2003-03-08 08:01:31 +00:00
crypto
ddb Change the process flags P_KSES to be P_THREADED. 2003-02-27 02:05:19 +00:00
dev Remove duplicate line introduced in the previous commit. 2003-03-15 18:49:41 +00:00
fs - Add a lock for protecting against msleep(bp, ...) wakeup(bp) races. 2003-03-13 07:31:45 +00:00
geom Use devstat_{start,end}_transaction_bio(). 2003-03-15 10:49:26 +00:00
gnu - Lock the buf before clearing flags. 2003-03-13 07:07:16 +00:00
i4b Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
i386 Grab Giant around calls to contigmalloc() and contigfree() so 2003-03-13 17:18:48 +00:00
ia64 Bah, get it right this time and add sys/lock.h before sys/mutex.h. 2003-03-14 13:30:31 +00:00
isa Call devstat_start_transaction_bio() instead of devstat_start_transaction() 2003-03-15 10:50:44 +00:00
isofs/cd9660 Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
kern Run a revision of the devstat interface: 2003-03-15 21:59:06 +00:00
libkern Further GC of M_STRING, missed previously. 2003-02-26 01:00:29 +00:00
modules Simplify the assignment statement. 2003-03-12 14:32:46 +00:00
net Update interface statistics after MAC and IFF_UP|IFF_RUNNING checks. 2003-03-15 21:51:39 +00:00
netatalk Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netatm Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netgraph Include correct opt_* headers for supported address families. Dike out 2003-03-08 16:25:27 +00:00
netinet Add a 'verrevpath' option that verifies the interface that a packet 2003-03-15 01:13:00 +00:00
netinet6 correct malloc flag argument 2003-03-12 06:08:48 +00:00
netipsec Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netipx Remove unimplemented IP-in-IPX encapsulation support (options IPTUNNEL). 2003-03-08 06:58:22 +00:00
netkey Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
netnatm Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
netncp Note that MAJOR_AUTO is now the default if d_maj is not initialized. This 2003-03-09 11:03:45 +00:00
netsmb Remove fragments of support for the FreeBSD 3.x and 4.x branches. 2003-03-06 10:38:18 +00:00
nfs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsclient - Add a forgotten BUF_LOCK() 2003-03-14 05:13:19 +00:00
nfsserver - Lock bufs before inspecting their flags. 2003-03-13 07:05:22 +00:00
opencrypto Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
pc98 Call devstat_start_transaction_bio() instead of devstat_start_transaction() 2003-03-15 10:50:44 +00:00
pccard Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
pci Add pci id# for the sis648 2003-03-13 07:55:53 +00:00
posix4 Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
powerpc Grab Giant around calls to contigmalloc() and contigfree() so 2003-03-13 17:18:48 +00:00
rpc
security Do not depend on namespace pollution, explicitly include sys/sx.h 2003-03-12 02:55:20 +00:00
sparc64 lock.h must be included before mutex.h. 2003-03-14 07:19:29 +00:00
sys Run a revision of the devstat interface: 2003-03-15 21:59:06 +00:00
tools
ufs - Remove a race between fsync like functions and flushbufqueues() by 2003-03-13 07:19:23 +00:00
vm - When the VM daemon is out of swap space and looking for a 2003-03-12 23:13:16 +00:00
Makefile