summaryrefslogtreecommitdiff
path: root/sys/kern/subr_devstat.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.Poul-Henning Kamp2000-07-041-1/+1
| | | | | | | Pointed out by: bde Notes: svn path=/head/; revision=62573
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:Poul-Henning Kamp2000-07-031-1/+1
| | | | | | | | | | | Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our sources: -sysctl_vm_zone SYSCTL_HANDLER_ARGS +sysctl_vm_zone (SYSCTL_HANDLER_ARGS) Notes: svn path=/head/; revision=62454
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-2/+2
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-2/+2
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Remove devstat_end_transaction_buf() everybody usesPoul-Henning Kamp2000-05-061-18/+0
| | | | | | | devstat_end_transaction_bio() now. Notes: svn path=/head/; revision=60072
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-05-051-0/+1
| | | | | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter Notes: svn path=/head/; revision=60041
* Clone bio versions of certain bits of infrastructure:Poul-Henning Kamp2000-04-021-0/+17
| | | | | | | | | | | | | | | | devstat_end_transaction_bio() bioq_* versions of bufq_* incl bioqdisksort() the corresponding "buf" versions will disappear when no longer used. Move b_offset, b_data and b_bcount to struct bio. Add BIO_FORMAT as a hack for fd.c etc. We are now largely ready to start converting drivers to use struct bio instead of struct buf. Notes: svn path=/head/; revision=58942
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp2000-04-021-1/+1
| | | | | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde. Notes: svn path=/head/; revision=58934
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful. Notes: svn path=/head/; revision=58345
* This is a partial commit of the patch from PR 14914:Poul-Henning Kamp1999-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 Notes: svn path=/head/; revision=53212
* Removed unnecessary splclock() protection for getmicrotime() andBruce Evans1999-10-021-16/+1
| | | | | | | | | | | getmicrouptime(). Removed unused includes. Reviewed by: ken Notes: svn path=/head/; revision=51856
* Stylistic cleanup.Poul-Henning Kamp1999-09-221-5/+3
| | | | | | | Submitted by: ken. Notes: svn path=/head/; revision=51559
* Move an end-paren to its intended place.Poul-Henning Kamp1999-09-191-1/+1
| | | | Notes: svn path=/head/; revision=51397
* Count "free" operations in their own new tranaction type.Poul-Henning Kamp1999-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(). Notes: svn path=/head/; revision=51375
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Add sysctl descriptions to many SYSCTL_XXXsBill Fumerola1999-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) Notes: svn path=/head/; revision=46381
* Staticize.Eivind Eklund1999-04-111-2/+2
| | | | Notes: svn path=/head/; revision=45569
* Add a prioritization field to the devstat_add_entry() call so thatKenneth D. Merry1999-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 Notes: svn path=/head/; revision=43819
* Fix some 64bit truncation problems which crept into SYSCTL_LONG() with theDoug Rabson1998-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 Notes: svn path=/head/; revision=42095
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()Archie Cobbs1998-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> Notes: svn path=/head/; revision=41514
* Now that the wd driver is fixed (Thanks Bruce!), re-enable theKenneth D. Merry1998-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. Notes: svn path=/head/; revision=41193
* My changes to the new device interface:Garrett 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 Notes: svn path=/head/; revision=41153
* Disable the 'devstat_end_transaction' busy count printf until after 3.0Kenneth D. Merry1998-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 Notes: svn path=/head/; revision=40359
* Make the printf when busy_time < 0 a little more descriptive. This mayKenneth D. Merry1998-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 Notes: svn path=/head/; revision=39985
* Change the devstat generation number from an int to a long. The int-sizedKenneth D. Merry1998-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> Notes: svn path=/head/; revision=39498
* New Kernel device statistics code.Justin T. Gibbs1998-09-151-0/+245
Submitted by: "Kenneth D. Merry" <ken@plutotech.com> Notes: svn path=/head/; revision=39229