Commit Graph

301 Commits

Author SHA1 Message Date
thorpej a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
wiz 1b7f309f0a Correct misspellings of "failed". 2002-03-04 01:38:31 +00:00
oster 71a4ca8acd Bah.. Not sure how those ";"'s got missed :-( 2002-01-19 22:20:48 +00:00
oster 9872e4c410 Let's not bother building a number of infrequently used RAID types.
The code is still there if people want it, but these other RAID
types (using various DECLUSTERING and SPARING techniques) arn't being
used in practise.  Saves about 100K on i386 GENERIC kernels.
2002-01-19 02:50:54 +00:00
oster e38e358cb2 Only include some debugging printf's if DEBUG is defined. 2002-01-19 01:51:51 +00:00
thorpej bd4e2862b0 We only need a single component buffer pool. 2002-01-09 04:21:43 +00:00
oster 2ad74785a4 Move a bunch of debugging stuff to be only used if DEBUG is turned on. 2002-01-09 03:10:19 +00:00
oster 19c2127b85 Revert previous. Need to be more careful with what gets chopped out. 2002-01-07 05:30:53 +00:00
oster 345de5b80a Some of this stuff is really just for debugging, so compile it only if
DEBUG is defined.
2002-01-07 02:27:42 +00:00
oster af9b7112ab #if 0 rf_SetReconfiguredMode() since it is unused now, but may be
needed someday.
2002-01-07 01:58:03 +00:00
oster 3b488c3f27 Fix an off-by-one error when autoconfig is hunting for a free RAID
device in the rare event that the one it wants is already in use.
Thanks to Wolfgang Stukenbrock for noticing the bug and filing the PR.
This fix addresses PR#14862.
2001-12-16 22:57:32 +00:00
lukem 371fd3fc10 use #ifdef RAID_AUTOCONFIG (for consistency with the rest of the kernel) 2001-11-28 05:39:13 +00:00
oster d11d1bd6fe Cleanup some whitespace that indent got wrong a long time ago. 2001-11-20 02:37:29 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem a3746e00b7 add RCSIDs 2001-11-13 07:11:12 +00:00
oster 525f4a9bed Backout a line that accidentally got included when the .h reorg went in. 2001-10-06 00:47:46 +00:00
oster 035a63f6d3 More #if 0's bite the dust. 2001-10-05 15:41:23 +00:00
oster 9d1d665dac Nuke some #if 0 stuff. 2001-10-05 15:33:12 +00:00
oster d00ed4116f Tidy up the #includes a bit. (coulda/shoulda done that with last commit.) 2001-10-04 17:42:29 +00:00
oster 2621bd1124 rf_options.h isn't needed here. 2001-10-04 17:41:17 +00:00
oster aa7a54f593 If rf_options.h needs to be include it, then include it. Don't rely on
another .h file to pull it in.
2001-10-04 17:39:18 +00:00
oster dad0d4578c Nuke a couple of unused extern variable declarations. 2001-10-04 17:31:01 +00:00
oster 32c731329a These have been completely replaced by raidframevar.h and raidframeio.h. 2001-10-04 16:08:51 +00:00
oster fe686dfde7 Setup installation mechanism for <dev/raidframe/raidframevar.h> and
<dev/raidframe/raidframeio.h>
2001-10-04 16:04:16 +00:00
oster 765e00d3de Step 2 of the disentanglement. We now look to <dev/raidframe/*> for
the stuff that used to live in rf_types.h, rf_raidframe.h, rf_layout.h,
rf_netbsd.h, rf_raid.h, rf_decluster,h, and a few other places.
Believe it or not, when this is all done, things will be cleaner.

No functional changes to RAIDframe.
2001-10-04 15:58:51 +00:00
oster 46a6eb1477 Step 1 of the disentangling of RAIDframe's .h files:
raidframevar.h - contains bits of rf_types.h, rf_layout.h,
rf_netbsd.h, rf_raid.h, and rf_decluster.h.

raidframeio.h - contains the bits needed for doing IOCTL's w/
RAIDframe.

These bits will be visible to userland.
2001-10-04 15:43:57 +00:00
oster d7a81df519 RF_DEV2RAIDID isn't used anywhere anymore. Bye bye. 2001-09-26 03:01:19 +00:00
oster de43684ab7 - rf_types.h doesn't really need to pull in rf_archs.h
- for *.c, don't rely on rf_types.h to pull in rf_archs.h
2001-09-26 02:52:57 +00:00
oster e475673b85 Nuke an unused typedef. 2001-09-25 02:56:13 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
thorpej 1cbbd5c37c Disable all of the RF_ASSERT()s by default, enabling them if the
RAID_DIAGNOSTIC option is specified in the kernel configuration
file.
2001-09-01 23:50:43 +00:00
oster 99020323e6 Nuke the 5 NULL parameters from rf_DoAccess(). Observe that 4 of
the variables are passed directly to rf_AllocRaidAccDesc(), and the 5th
isn't even used.  Hunt them down and nuke them too.
2001-07-27 03:30:07 +00:00
thorpej 228b23427f bcmp -> memcmp 2001-07-18 06:46:46 +00:00
thorpej cf56c44a86 bzero -> memset 2001-07-18 06:45:33 +00:00
oster 81f5c58b58 If we're closing the last partition on a RAID set and the system is
being shutdown, then unconfigure the RAID set too.  This fixes a number
of issues with doing proper unconfigures/shutdowns of multi-level RAID
sets.

Thanks to Jason Thorpe and Bill Squier for the ideas/suggestions on
how/where to do this, and to Bill Squier for testing.
2001-07-16 15:50:27 +00:00
oster bdfad3793f We don't need to check for raidautoconfig here, so nuke it and
clean up a little.
2001-06-21 03:07:04 +00:00
oster 76d322c58c #if out a few more bits that arn't required if we are not doing
PQ or RAID6.
2001-06-20 03:09:23 +00:00
oster 0e8f8213af A bunch of these bits are only needed for the EVENODD stuff.
Shaves a little better than 1K off the size of an i386 kernel.
2001-06-19 03:25:16 +00:00
oster 669f5cc5a5 It's silly to need a parity rebuild after a reconstruction has completed.
If we've just reconstructed a disk, then the parity is known to
be correct.  (XXX doesn't hold for RAID 6!)
2001-06-14 02:35:56 +00:00
mrg 054673b07c #endif /* takes no argument */ 2001-06-08 12:51:17 +00:00
oster 856e0a920e A value of 1 for tracks/cylinder in the disklabel is apparently sub-optimal.
Thus we choose "4 * number_of_columns" as a more reasonable
value (until someone comes up with something better).
This pretends to properly address PR#11989.
2001-04-05 02:48:51 +00:00
mrg 8e0434ce99 include <sys/param.h> before <sys/ioctl.h> 2001-02-03 12:51:10 +00:00
oster cc2a28f2c0 Un-'__P'ify. 2001-01-27 20:42:20 +00:00
oster 1949425ffc Nuke some bogus debug code that was already '#if 0'ed out. 2001-01-27 20:18:55 +00:00
oster e6d8ca0dee Cosmetic cleanup of some comments, and nuke an unused #define. 2001-01-27 20:10:49 +00:00
oster 75ea8b428e Having moved some of the bits needed by raidctl into rf_configure.c, we
no longer need those bits here.  In particular, this file is now only
used in the kernel, and that allows us to clean up a lot of cruft.
2001-01-27 19:34:43 +00:00
oster 3edd34f0be More #if's. This needs some serious rototillage, but a few #if's will
suffice for now.
2001-01-27 02:13:34 +00:00
oster c4a426333f My.. what a twisty little maze of #defines and dependencies. Some of this
code is used for more than anticipated, and I missed a few checks last
night.  Thanks to Bernd Ernesti for poking me about this.
2001-01-26 14:06:16 +00:00
oster e47b177bc0 Nobody calls these bits if we arn't doing RAID5 with rotated spare stuff.
Add an #if.
2001-01-26 05:16:58 +00:00
oster 1763f954c7 These bits are only needed for the interdecluster stuff.. wrap them
with an #if.
2001-01-26 05:09:13 +00:00