summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_devstat.c
Commit message (Collapse)AuthorAgeFilesLines
* Use strlcpy() instead of strncpy() to copy NUL terminated stringsrobert2002-10-171-2/+1
| | | | for safety and consistency.
* GC: BIO_ORDERED, various infrastructure dealing with BIO_ORDERED.phk2002-02-221-2/+1
|
* Export the head structure for the device statistics STAILQ intmm2001-08-041-1/+1
| | | | | sys/devicestat.h, so that the queue can be walked in crashdumps using libkvm.
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-041-2/+1
| | | | | Created with: sed(1) Reviewed by: md5(1)
* Support for unsigned integer and long sysctl variables. Update thejhb2000-07-051-1/+1
| | | | | | | | | SYSCTL_LONG macro to be consistent with other integer sysctl variables and require an initial value instead of assuming 0. Update several sysctl variables to use the unsigned types. PR: 15251 Submitted by: Kelly Yancey <kbyanc@posi.net>
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.phk2000-07-041-1/+1
| | | | Pointed out by: bde
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:phk2000-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)
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Remove devstat_end_transaction_buf() everybody usesphk2000-05-061-18/+0
| | | | devstat_end_transaction_bio() now.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-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
* Clone bio versions of certain bits of infrastructure:phk2000-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.
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-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.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-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.
* 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