Commit Graph

30 Commits

Author SHA1 Message Date
thorpej 46cfcf0eb8 Add support for wedges to the logical disk driver. 2004-09-25 04:28:08 +00:00
thorpej b560f85cc5 Use ANSI function decls, sprinkle static. 2004-08-30 00:34:41 +00:00
dbj aeec9b8f23 use uint64 instead of int for sc_secperunit 2004-07-20 15:44:20 +00:00
tls 14cd9beeae Don't use BUFQ_FCFS. It degrades performance both for "smart" (Mylex
ExtremeRAID with NV cache) and "dumb" (3ware 6410) ld providers.

Instead, use the default buffer queue policy.

With the 3ware adapter, using the read priority strategy instead of FCFS,
for three extractions of pkgsrc, took 329 seconds instead of 331 -- but
with a dramatic improvement in perceived system response (latency for
I/O outside the main stream).

With the Mylex adapter, the improvement was dramatic: using read priority
instead of FCFS yielded an improvement from 381 seconds to 135 seconds!
There was a less-noticeable improvement in perceived latency as well.

The other disk drivers currently hard-wired to FCFS or another policy
should probably be changed as well.
2004-03-22 17:30:33 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
thorpej 76464bb996 * Don't wait for commands to drain when adjusting the queue length.
Instead, wait when it's really needed, when detaching.  Project
  draining from spruious wakeups.
* Don't flush the controller's cache when detaching; we can't do it
  reliably, as the controller probably things the array drive no
  longer exists.  The cache is already flushed in ldclose() so this
  should be no problem.
2003-06-13 02:32:27 +00:00
thorpej 47edad1115 Always queue transfers in the ld driver to prevent transient resource
shortages in the back-ends from aborting transfers.

Reviewed by ad@.
2003-06-07 23:37:24 +00:00
thorpej 4aef050969 Add DIOCKLABEL support. Fixes PR kern/21605 (Luke Mewburn). 2003-05-17 16:11:52 +00:00
itojun ce084afabe use strlcpy 2003-05-16 15:34:25 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
thorpej 8dc5018716 If the upper-layer provides a geometry, use it. 2003-01-27 02:43:30 +00:00
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