Commit Graph

18 Commits

Author SHA1 Message Date
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
hannken 7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
hannken 96ea8912e6 Convert to new device buffer queue interface. 2002-07-20 11:28:07 +00:00
drochner 3c33c0f57e Since the minor numbers belonging to the partitions of a disk are not
contigous anymore, we can't call vdevgone() for the whole range at once.
(we should probably change the vdevgone() interface)
This also fixes some wrong use of DISKUNIT().
2002-05-08 15:49:07 +00:00
lukem 2bbe2de647 add RCSIDs 2001-11-13 05:32:49 +00:00
thorpej 8b59971a0d Don't compare bp->b_dev against RAW_PART; use the `part' local variable
instead.
2001-09-06 00:47:56 +00:00
ad b25d5c0666 Pasto; found by tls. 2001-07-24 21:55:35 +00:00
ad bfac43a1c8 Centralise the geometry fudge. 2001-06-10 10:48:42 +00:00
lukem 9d02aae3a9 minor lint 2001-04-30 02:44:53 +00:00
ad 8067f991df Allow for draining/adjusting the queue. 2001-02-04 17:15:37 +00:00
itojun 9bbe5b85ca "lp" must be defined reagardless from __HAVE_OLD_DISKLABEL 2001-01-08 06:57:21 +00:00
fvdl d040bd5908 Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.
2001-01-08 02:03:45 +00:00
fvdl e2d1c1f926 Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).
2001-01-07 18:09:01 +00:00
ad 8494f44b67 Make dumps work, and put the first part of detach into ld.c. 2001-01-03 21:01:28 +00:00
ad a5248b66cf Make it possible to detach ld devices. 2000-12-03 13:03:30 +00:00
ad 57ea462da2 lsu -> ld, by popular request. 2000-11-26 17:44:02 +00:00