History log of /src/sys/dev/raidframe/rf_reconutil.c |
Revision | | Date | Author | Comments |
1.38 |
| 23-Jul-2021 |
oster | Extensive mechanical changes to the pools used in RAIDframe.
Alloclist remains not per-RAID, so initialize that pool separately/differently than the rest.
The remainder of pools in RF_Pools_s are now per-RAID pools. Mostly mechanical changes to functions to allocate/destroy per-RAID pools. Needed to make raidPtr available in certain cases to be able to find the per-RAID pools.
Extend rf_pool_init() to now populate a per-RAID wchan value that is unique to each pool for a given RAID device.
TODO: Complete the analysis of the minimum number of items that are required for each pool to allow IO to progress (i.e. so that a request for pool resources can always be satisfied), and dynamically scale minimum pool sizes based on RAID configuration.
|
1.37 |
| 09-Feb-2019 |
christos | branches: 1.37.16; - Change the allocation macros to be more like function calls - Change sizeof(type) -> sizeof(*variable) - Use macros for the long buffer length allocations - Remove "bit polishing" memsets() -- do them only once - Remove unnecessary casts
Thanks to oster@ for finding bugs and testing.
|
1.36 |
| 18-Jan-2018 |
mrg | branches: 1.36.4; implement 32-bit compat support for raidframe.
convert several raidframe ioctls to be bitsize idempotent so that they work the same in 32 and 64 bit worlds, allowing netbsd32 to configure and query raid properly. remove useless 'row' in a few places. add COMPAT_80 and put the old ioctls there.
raidframeio.h: RAIDFRAME_TEST_ACC - remove, unused RAIDFRAME_GET_COMPONENT_LABEL - convert to label not pointer to label RAIDFRAME_CHECK_RECON_STATUS_EXT RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT RAIDFRAME_CHECK_COPYBACK_STATUS_EXT - convert to progress info not pointer to info RAIDFRAME_GET_INFO - version entirely. raidframevar.h: - rf_recon_req{} has row, flags and raidPtr removed (they're not a useful part of this interface.) - RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed. - RF_RaidDisk_s{} is re-ordered slightly to fix alignment padding - the actual data was already OK. - InstallSpareTable() loses row argument
rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32.
rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK, RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT, RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT, RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO.
move several of the per-ioctl code blocks into separate functions.
add rf_recon_req_internal{} to replace old usage of global rf_recon_req{} that had unused void * in the structure, ruining it's 32/64 bit ABI.
add missing case for RAIDFRAME_GET_INFO50.
adjust raid tests to use the new .conf format, and add a case to test the old method as well.
raidctl: deal with lack of 'row' members in a couple of places. fail request no longer takes row. handle "START array" sections with just "numCol numSpare", ie no "numRow" specified. for now, generate old-style configuration but update raidctl.8 to specify the new style (keeping reference to the old style.)
note that: RF_ComponentLabel_s::{row,num_rows} and RF_SingleComponent_s::row are obsolete but not removed yet.
|
1.35 |
| 15-Sep-2013 |
martin | Mark a variable as potentially unused
|
1.34 |
| 11-May-2011 |
mrg | branches: 1.34.4; 1.34.14; 1.34.18; convert the main raidPtr mutex to a kmutex, and add a couple of cv's to cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond. convert all remaining simple_lock's to kmutexes (they're not used or compiled right now... even with all options enabled) and remove the support for them.
this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.
|
1.33 |
| 02-May-2011 |
mrg | convert rb_mutex to a kmutex/cv.
|
1.32 |
| 02-May-2011 |
mrg | re-apply the reverted previous, after fixing the missed wakeup:
convert eq_mutex to a kmutex/cv. convert ltsleep() used for plain timeout into kpause().
|
1.31 |
| 02-May-2011 |
mrg | rever the previous for now; it hangs reconstruction.
|
1.30 |
| 01-May-2011 |
mrg | convert eq_mutex to a kmutex. convert ltsleep() used for plain timeout into kpause().
|
1.29 |
| 30-Apr-2011 |
mrg | - convert rf_printf_mutex to a kmutex - convert rf_rad_lock and the per-raid "cv" to per-raid kmutex/and real cv - use rf_mutex_init() in places, and move it with the similar definitions
|
1.28 |
| 04-Mar-2007 |
christos | branches: 1.28.64; 1.28.70; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.27 |
| 26-Apr-2006 |
oster | branches: 1.27.14; un-bitrot some of this code (which is not included by default in kernels), and make it build again. XXX: Paritylogging bits still won't build.
|
1.26 |
| 11-Dec-2005 |
christos | branches: 1.26.4; 1.26.6; 1.26.8; 1.26.10; 1.26.12; merge ktrace-lwp.
|
1.25 |
| 27-Feb-2005 |
perry | branches: 1.25.4; nuke trailing whitespace
|
1.24 |
| 05-Feb-2005 |
oster | Vastly improve the error handling in the case of a read/write error that occurs during a reconstruction. We go from zero error handling and likely panicing if something goes amiss, to gracefully bailing and leaving the system in the best, usable state possible.
- introduce rf_DrainReconEventQueue() to allow easy cleaning of the reconstruction event queue
- change how we cleanup the floating recon buffers in rf_FreeReconControl(). Detect the end of the list rather than traversing according to a count.
- keep track of the number of pending reconstruction writes. In the event of a read error, use this to wait long enough for the pending writes to (hopefully) drain.
- more cleanup is still needed on this code, but I didn't want to start mixing major functional changes with minor cleanups.
XXX: There is a known issue with pool items left outstanding due to the IO failure, and this can show up in the form of a panic at the tail end of a shutdown. This problem is much less severe than before these changes, and the hope/plan is that this problem will go away once this code gets overhauled again.
|
1.23 |
| 18-Mar-2004 |
oster | branches: 1.23.8; 1.23.10; Re-work the locking mechanisms for reconstruct and PSS structures such that we don't actually hold a simplelock while we are doing a pool_get(), but that we still effectively protecting critical code.
This should fix all of the outstanding LOCKDEBUG warnings related to rebuilding RAID sets.
|
1.22 |
| 07-Mar-2004 |
oster | - Introduce rf_pools which contains all of the various global pools used by RAIDframe. Convert all other RAIDframe global pools to use pools defined within this new structure. - Introduce rf_pool_init(), used for initializing a single pool in RAIDframe. Teach each of the configuration routines to use rf_pool_init(). - Cleanup a few pool-related comments. - Cleanup revent initialization and #defines. - Add a missing pool_destroy() for the reconbuffer pool.
(Saves another 1K off of an i386 GENERIC kernel, and makes stuff a lot more readable)
|
1.21 |
| 07-Mar-2004 |
oster | - fix up initialization of rf_recond_pool - introduce rf_reconbuffer_pool and teach rf_MakeReconBuffer() to use it
|
1.20 |
| 01-Jan-2004 |
oster | Nuke a bunch of unused variables: - node_queue_cond - quiescent_cond - eq_cond - desc->cond - desc->head - diskqueue->numWaiting
Nuke rf_print_unable_to_init_cond(). Nuke rf_TerminateDiskQueues prototype from rf_diskqueue.h.
|
1.19 |
| 30-Dec-2003 |
oster | Some days you wonder if some of the function declaration consistency was just an accident in the first place. Cleanup function decls and a few comments. [ok.. so I wasn't going to fix this many.. but once you're on a roll....]
|
1.18 |
| 29-Dec-2003 |
oster | Since rf_mutex_destroy() is effectively a NOP now, nuke it.
|
1.17 |
| 29-Dec-2003 |
oster | Reduce uses of rf_mutex_init() and rf_cond_init(). Streamlines code, removes useless error detection, and generally makes things easier to follow.
|
1.16 |
| 29-Dec-2003 |
oster | - first kick at a major reworking of RAIDframe's memory allocation code: - all freelists converted to pools - initialization of structure members in certain cases where code was relying on specific allocation and usage properties to keep structures in a "known state" (that doesn't work with pools!). - make most pool_get() be "PR_WAITOK" until they can be analyzed further, and/or have proper error handling added. - all RF_Mallocs zero the space returned, so there is no difference between RF_Calloc and RF_Malloc. In fact, all the RF_Calloc()'s do is tend to do is get things horribly confused. Make RF_Malloc() the "general memory allocator", with RF_MallocAndAdd() the "general memory allocator with allocation list". - some of these RF_Malloc's et al. are destined to disappear. - remove rf_rdp_freelist entirely (it's not used anywhere!) - remove: #include "rf_freelist.h" - to the files that were relying on the above, add: #include "rf_general.h" - add: #include "rf_debugMem.h" to rf_shutdown.h to make it happy about the loss of: #include "rf_freelist.h".
This shrinks an i386 GENERIC kernel by approx 5K. RAIDframe now weighs in at about 162K on i386.
|
1.15 |
| 29-Dec-2003 |
oster | [Having received a definite lack of strenuous objection, a small amount of strenuous agreement, and some general agreement, this commit is going ahead because it's now starting to block some other changes I wish to make.]
Remove most of the support for the concept of "rows" from RAIDframe. While the "row" interface has been exported to the world, RAIDframe internals have really only supported a single row, even though they have feigned support of multiple rows.
Nothing changes in configuration land -- config files still need to specify a single row, etc. All auto-config structures remain fully forward/backwards compatible.
The only visible difference to the average user should be a reduction in the size of a GENERIC kernel (i386) by 4.5K. For those of us trolling through RAIDframe kernel code, a lot of the driver configuration code has become a LOT easier to read.
|
1.14 |
| 09-Feb-2003 |
jdolecek | branches: 1.14.2; constify some
|
1.13 |
| 23-Nov-2002 |
oster | Bye-bye to the completely unused reconCtrlPtr->priorityList.
|
1.12 |
| 19-Nov-2002 |
oster | #if out some stuff that's only used for some distributed sparing stuff. Shaves another 500 bytes from an i386 kernel.
|
1.11 |
| 07-Oct-2002 |
oster | Minor comment and 80-column fixes. No functional changes.
|
1.10 |
| 17-Sep-2002 |
oster | Rename RF_DEBUG_RECONBUFFER to RF_DEBUG_RECON in order to facilitate disabling other stuff without having to introduce another #define.
|
1.9 |
| 16-Sep-2002 |
oster | Assign a value to recon_buffer_size in a different way so that the compiler doesn't complain when we change what RF_Free looks like.
|
1.8 |
| 16-Sep-2002 |
oster | 'char *arrived' was such a nice variable. Too bad all we ever did with it was malloc/free space for it. *poof*
|
1.7 |
| 16-Sep-2002 |
oster | rf_CheckFloatingRbufCount() is only really useful when debugging the reconstruct buffer stuff. #if it out in the general case.
|
1.6 |
| 14-Sep-2002 |
oster | Everyone and their dog was using RF_ERRORMSG3 to print out the same sort of error message, over and over again, in different files. Rather than having the same text repeated in multiple .o files, create a couple of little functions to do the printing, and save a bundle of space. Also improves readability of code.
|
1.5 |
| 13-Nov-2001 |
lukem | add RCSIDs
|
1.4 |
| 04-Oct-2001 |
oster | 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.
|
1.3 |
| 05-Feb-1999 |
oster | branches: 1.3.20; 1.3.22; 1.3.24; Phase 2 of the RAIDframe cleanup. The source is now closer to KNF and is much easier to read. No functionality changes.
|
1.2 |
| 26-Jan-1999 |
oster | RAIDframe cleanup, phase 1. Nuke simulator support, user-land driver, out-dated comments, and other unneeded stuff. This helps prepare for cleaning up the rest of the code, and adding new functionality.
No functional changes to the kernel code in this commit.
|
1.1 |
| 13-Nov-1998 |
oster | RAIDframe, version 1.1, from the Parallel Data Laboratory at Carnegie Mellon University. Full RAID implementation, including levels 0, 1, 4, 5, 6, parity logging, and a few other goodies. Ported to NetBSD by Greg Oster.
|
1.3.24.1 |
| 11-Oct-2001 |
fvdl | Catch up with -current. Fix some bogons in the sparc64 kbd/ms attach code. cd18xx conversion provided by mrg.
|
1.3.22.2 |
| 10-Oct-2002 |
jdolecek | sync kqueue with -current; this includes merge of gehenna-devsw branch, merge of i386 MP branch, and part of autoconf rototil work
|
1.3.22.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.3.20.5 |
| 11-Dec-2002 |
thorpej | Sync with HEAD.
|
1.3.20.4 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.3.20.3 |
| 17-Sep-2002 |
nathanw | Catch up to -current.
|
1.3.20.2 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.3.20.1 |
| 22-Oct-2001 |
nathanw | Catch up to -current.
|
1.14.2.5 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.14.2.4 |
| 06-Feb-2005 |
skrll | Sync with HEAD.
|
1.14.2.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.14.2.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.14.2.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.23.10.2 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.23.10.1 |
| 12-Feb-2005 |
yamt | sync with head.
|
1.23.8.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.25.4.2 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.25.4.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.26.12.1 |
| 24-May-2006 |
tron | Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
|
1.26.10.1 |
| 11-May-2006 |
elad | sync with head
|
1.26.8.1 |
| 24-May-2006 |
yamt | sync with head.
|
1.26.6.1 |
| 01-Jun-2006 |
kardel | Sync with head.
|
1.26.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.27.14.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.28.70.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.28.64.1 |
| 31-May-2011 |
rmind | sync with head
|
1.34.18.1 |
| 18-May-2014 |
rmind | sync with head
|
1.34.14.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.34.4.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.36.4.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.37.16.1 |
| 01-Aug-2021 |
thorpej | Sync with HEAD.
|