summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_devstat.c
Commit message (Collapse)AuthorAgeFilesLines
* This is a partial commit of the patch from PR 14914:phk1999-11-161-2/+2
| | | | | | | | | | | | | Alot of the code in sys/kern directly accesses the *Q_HEAD and *Q_ENTRY structures for list operations. This patch makes all list operations in sys/kern use the queue(3) macros, rather than directly accessing the *Q_{HEAD,ENTRY} structures. This batch of changes compile to the same object files. Reviewed by: phk Submitted by: Jake Burkholder <jake@checker.org> PR: 14914
* Removed unnecessary splclock() protection for getmicrotime() andbde1999-10-021-16/+1
| | | | | | | | getmicrouptime(). Removed unused includes. Reviewed by: ken
* Stylistic cleanup.phk1999-09-221-5/+3
| | | | Submitted by: ken.
* Move an end-paren to its intended place.phk1999-09-191-1/+1
|
* Count "free" operations in their own new tranaction type.phk1999-09-181-1/+25
| | | | | | | WARNING: libdevstat, iostat, vmstat, systat etc etc will need a recompile. Add devstat_end_transaction_buf() which pulls all the vital data out of a struct buf which is ready for biodone().
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add sysctl descriptions to many SYSCTL_XXXsbillf1999-05-031-7/+7
| | | | | | | PR: kern/11197 Submitted by: Adrian Chadd <adrian@FreeBSD.org> Reviewed by: billf(spelling/style/minor nits) Looked at by: bde(style)
* Staticize.eivind1999-04-111-2/+2
|
* Add a prioritization field to the devstat_add_entry() call so thatken1999-02-101-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix some 64bit truncation problems which crept into SYSCTL_LONG() with thedfr1998-12-271-2/+2
| | | | | | | | last cleanup. Since the oid_arg2 field of struct sysctl_oid is not wide enough to hold a long, the SYSCTL_LONG() macro has been modified to only support exporting long variables by pointer instead of by value. Reviewed by: bde
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-1/+2
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Now that the wd driver is fixed (Thanks Bruce!), re-enable theken1998-11-151-10/+2
| | | | | | | devstat_end_transaction error message that gets printed whenever the busy count is < 0. This will help catch drivers that improperly implement devstat(9) support.
* My changes to the new device interface:wollman1998-11-141-2/+2
| | | | | | | | | | | | | | - Interface wth the new resource manager. - Allow for multiple drivers implementing a single devclass. - Remove ordering dependencies between header files. - Style cleanup. - Add DEVICE_SUSPEND and DEVICE_RESUME methods. - Move to a single-phase interrupt setup scheme. Kernel builds on the Alpha are brken until Doug gets a chance to incorporate these changes on that side. Agreed to in principle by: dfr
* Disable the 'devstat_end_transaction' busy count printf until after 3.0ken1998-10-141-2/+10
| | | | | | | | | | release goes out the door. We know there's a bug in the devstat implementation in the wd driver, but bde and msmith haven't been able to fix it yet. So, disable the printf to avoid confusing/worrying people. Suggested by: msmith
* Make the printf when busy_time < 0 a little more descriptive. This mayken1998-10-061-2/+4
| | | | | | | | help track down bugs in the devstat implementation in various drivers. (i.e., any situation where the driver does not call the devstat routines once and only once for each transaction initiation and completion) Prompted by: msmith
* Change the devstat generation number from an int to a long. The int-sizedken1998-09-201-5/+5
| | | | | | | | | | 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>
* New Kernel device statistics code.gibbs1998-09-151-0/+245
Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
OpenPOWER on IntegriCloud