Commit Graph

29 Commits

Author SHA1 Message Date
ad 9abeea588a Replace some uses of lockmgr() / simplelocks. 2007-02-15 15:40:50 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
yamt 043a545875 hide bufq_state from userland. 2004-10-28 06:59:18 +00:00
thorpej c5ed5cafd4 Protect against multiple inclusion. 2004-08-23 04:30:28 +00:00
lukem 0b441623fe Add user flag CCDF_NOLABEL to prevent the on-disk label from being read
during CCDIOCSET.
Use this when creating a new ccd to ignore any existing disklabel
which is probably wrong.
2003-10-17 05:16:15 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
thorpej 2f25411d28 Use a buffer queue. Primary advantage here is robustness in the face
of temporary resource shortages.
2003-05-17 21:42:08 +00:00
thorpej 4aef050969 Add DIOCKLABEL support. Fixes PR kern/21605 (Luke Mewburn). 2003-05-17 16:11:52 +00:00
jdolecek 539f3bcc23 change ccio_ndisks and sc_nccdisks of struct ccd_ioctl from int to u_int
introduce hard limit on number of disks which can be contcatenated togetger,
CCD_MAXNDISKS
2001-08-05 11:20:13 +00:00
thorpej ae6f518821 Garbage-collect CCDF_SWAP; no longer used, and doesn't make any sense
with the UVM swap code.
1999-08-11 02:44:35 +00:00
thorpej dd5ae858e0 We really only need *one* componenet buffer pool... 1999-08-11 02:41:02 +00:00
thorpej c6aa25bfa1 Fix a st00p1d bug I introduced in rev 1.57, which would cause any activity
on non-0 CCD units to crash the system.
1999-01-21 00:35:15 +00:00
thorpej 0272b2ab8e Whole lotta cleanup wrt. how configuration data is stored internally, and
just lockmgr(), not our home-grown locking functions.
1999-01-12 00:21:47 +00:00
thorpej 00172c10d5 Nuke the mirroring code. RAIDframe is about to go in, and is a much
better mirroring solution.

The ccd driver will stay, even in the presence of RAIDframe, for applications
where just RAID-0 is needed (much smaller code footprint).
1998-11-13 00:26:19 +00:00
thorpej 4356136193 Use the pool allocator for component buffer headers. 1998-07-31 01:23:56 +00:00
jtc d6ae2cd7fd Fix tipo inherited from old version of TNF copyright template. 1997-10-09 08:03:42 +00:00
thorpej 9a815ed696 A performance optimization, inspired by a conversation with Thor Simon:
- Keep a freelist of component buffer headers, defaulting
	  to 8 headers per component (tunable with the CCDNBUF
	  kernel compile option).
	- When allocating a component buffer, try to pull a header
	  off the freelist first, falling back on MALLOC() if the
	  freelist is empty.  Use MALLOC() rather than malloc(),
	  because it will attempt to short-cut the allocation before
	  actually making a full-blown malloc() call.
	- Keep statistics on how many component buffer headers have
	  been allocated and how many of those allocations have
	  resulted in freelist misses.

With these changes, I observed measurable decreases in system and
wall clock time on operations on an 8G ccd, as well as a measurable
drop in the time spent in ccdbuffer() (measured with kernel profiling).
1997-01-30 04:00:52 +00:00
thorpej ee8a2c002f Copyright assigned to The NetBSD Foundation. 1996-02-28 01:01:17 +00:00
thorpej 732dd94a83 Add experimental data mirroring support, derived from code written by
Satoshi Asami and Nisha Talagala.  For details on using data mirroring,
see the ccd(4) manual page.
1996-02-01 20:47:13 +00:00
thorpej 5b39541e48 New generic disk framework. Highlights:
- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
1996-01-07 22:01:38 +00:00
thorpej 89d4987e5d Fix bad pointer deref, memory leak, and geometry calculation, pointed
out by Jochen Pohl in PR #1588.  Change the interleave index to an
array of ints rather than an array of chars to avoid losing in the event
one has more than 127 components.
1995-10-12 21:28:32 +00:00
thorpej b8dcfbd303 Implement a simple locking mechanism and use it, for sanity's sake.
In ccdopen(), don't update the disklabel if any partition is already open.
Prevents race bewteen ccdstrategy() and ccdgetdisklabel().
1995-10-09 00:46:45 +00:00
thorpej d6160bdc1b Fix typo in comment, from Chris P. Ross. 1995-08-23 01:08:10 +00:00
thorpej 77d85de272 New version of ccd. Allows dynamic run-time configuration and
unconfiguration and supports disklabels.
1995-08-17 16:31:30 +00:00
jtc 7c04233887 KERNEL -> _KERNEL 1995-03-26 20:23:52 +00:00
hpeyerl 3214723fcf These should have been the 4.4Lite versions. duh. 1994-07-02 06:03:47 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
hpeyerl 6f9db1ee2d Concat disk driver moved from hp300/dev to here. 1994-06-24 14:11:02 +00:00