History log of /src/sys/dev/raidframe/rf_netbsd.h |
Revision | | Date | Author | Comments |
1.38 |
| 23-Jul-2021 |
oster | The 'pss_issued' pool is unused, so remove it.
|
1.37 |
| 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.36 |
| 23-Jul-2021 |
oster | getiobuf() can return NULL if there are no IO buffers available. RAIDframe can't deal with that, so create a dedicated pool of buffers to use for IO. PR_WAITOK is fine here, as we pre-allocate more than we need to guarantee IO can make progress. Tuning of pool still to come.
|
1.35 |
| 19-Jun-2020 |
jdolecek | branches: 1.35.6; pass down b_flags B_PHYS|B_RAW|B_MEDIA_FLAGS from bio subsystem to component I/O
fixes the xbd(4) KASSERT() triggered by raidframe, noted in PR kern/55397 by Frank Kardel
|
1.34 |
| 10-Oct-2019 |
christos | fix the function pointer and callback mess: - callback functions return 0 and their result is not checked; make them void. - there are two types of callbacks and they used to overload their parameters and the callback structure; separate them into "function" and "value" callbacks. - make the wait function signature consistent.
|
1.33 |
| 06-Feb-2019 |
oster | branches: 1.33.4; Shuffle softc declarations to a different .h file. Create missing rf_get_raid(). Things compile, but don't work correctly.
|
1.32 |
| 05-Feb-2019 |
christos | - Redo all the ioctl compat stuff to use a standard "ioctl" interface, and provide methods to the private softc - Provide a function for constructing a RF_Raid_t from an RF_Config_t - Factor out the big inline ioctl code into functions
|
1.31 |
| 05-Feb-2019 |
christos | - Fix the FAIL_DISK handling (it would prolly trash the wrong disk before since the request structs are different and the row in the old struct is the col in the new one). - Restructure the way compat modules are loaded so that we only load them for the ioctls that need them. Put a comment explaining why... - Set retcode after loading compat (now that the fail disk passthrough hack is gone), so that various ioctls don't always fail.
|
1.30 |
| 27-Apr-2013 |
christos | branches: 1.30.36; allocate devices dynamically.
|
1.29 |
| 28-Apr-2008 |
martin | branches: 1.29.34; 1.29.44; Remove clause 3 and 4 from TNF licenses
|
1.28 |
| 13-Nov-2007 |
yamt | branches: 1.28.14; 1.28.16; 1.28.18; don't include <sys/namei.h> unnecessarily.
|
1.27 |
| 27-Aug-2006 |
christos | branches: 1.27.26; 1.27.28; 1.27.32; 1.27.34; - use dk_lookup instead of our home-spun version. - allow raid to be configured in a wedge - allow wedges to be configured in a raid - add autoconfiguration of wedges in a raid
|
1.26 |
| 07-Jan-2006 |
oster | branches: 1.26.2; 1.26.6; Remove the component buffer bits, now that I know there is a "private" structure in struct buf that can be used to keep track of the request associated with this buffer (the buffer used here is one allocated from rf_CreateDiskQueueData(), so it's ours to do with what we please). Shrinks code a little, reduces the run-time memory footprint a bit, and simplifies both rf_DispatchKernelIO() and KernelWakeupFunc().
Thanks to yamt for his "why is rf_DispatchKernelIO using another buf" question which prompted me to revisit this code.
|
1.25 |
| 11-Dec-2005 |
christos | branches: 1.25.2; merge ktrace-lwp.
|
1.24 |
| 25-Sep-2005 |
oster | Re-work the handling of incoming I/O in RAIDframe: - introduce rf_buf_queue_check() which checks to see if there is work to do in the incoming buffer queue - rf_RaidIOThread() is now responsible for calling raidstart(), and is also now the only place that calls raidstart() - raidstrategy() now just queues requests in buf_queue and signals rf_RaidIOThread() that work has arrived
Hopefully addresses PR#30233
|
1.23 |
| 29-May-2005 |
christos | branches: 1.23.2; - avoid variable shadowing - add a lot of const - remove parameters from functin declarations
|
1.22 |
| 27-Feb-2005 |
perry | branches: 1.22.2; nuke trailing whitespace
|
1.21 |
| 22-Jan-2005 |
oster | branches: 1.21.2; Reconstruction Descriptors are only allocated once per reconstruction, and don't need their own pool or freelist or anything fancier than a malloc/free.
|
1.20 |
| 09-Apr-2004 |
oster | branches: 1.20.4; These changes complete the effective removal of malloc() from all write paths within RAIDframe. They also resolve the "panics with RAID 5 sets with more than 3 components" issue which was present (briefly) in the commits which were previously supposed to address the malloc() issue.
With this new code the 5-component RAID 5 set panics are now gone.
It is also now also possible to swap to RAID 5.
The changes made are:
1) Introduce rf_AllocStripeBuffer() and rf_FreeStripeBuffer() to allocate/free one stripe's worth of space. rf_AllocStripeBuffer() is used in rf_MapUnaccessedPortionOfStripe() where it is not sufficient to allocate memory using just rf_AllocBuffer(). rf_FreeStripeBuffer() is called from rf_FreeRaidAccDesc(), well after the DAG is finished.
2) Add a set of emergency "stripe buffers" to struct RF_Raid_s. Arrange for their initialization in rf_Configure(). In low-memory situations these buffers will be returned by rf_AllocStripeBuffer() and re-populated by rf_FreeStripeBuffer().
3) Move RF_VoidPointerListElem_t *iobufs from the dagHeader into into struct RF_RaidAccessDesc_s. This is more consistent with the original code, and will not result in items being freed "too early".
4) Add a RF_RaidAccessDesc_t *desc to RF_DagHeader_s so that we have a way to find desc->iobufs.
5) Arrange for desc in the DagHeader to be initialized in InitHdrNode().
6) Don't cleanup iobufs in rf_FreeDAG() -- the freeing is now delayed until rf_FreeRaidAccDesc() (which is how the original code handled the allocList, and for which there seem to be some subtle, undocumented assumptions).
7) Rename rf_AllocBuffer2() to be rf_AllocBuffer() and remove the former rf_AllocBuffer(). Fix all callers of rf_AllocBuffer(). (This was how it was *supposed* to be after the last time these changes were made, before they were backed out).
8) Remove RF_IOBufHeader and all references to it.
9) Remove desc->cleanupList and all references to it.
Fixes PR#20191
|
1.19 |
| 20-Mar-2004 |
oster | branches: 1.19.2; For each RAID set, pre-allocate a number of "emergency buffers" to be used in the event that we can't malloc a buffer of the appropriate size in the traditional way. rf_AllocIOBuffer() and rf_FreeIOBuffer() deal with allocating/freeing these structures. These buffers are stored in a list on the 'iobuf' list. iobuf_count keeps track of how many buffers are available, and numEmergencyBuffers is the effective "high-water" mark for the freelist. The buffers allocated by rf_AllocIOBuffer() are stripe-unit sized, which is the maximum size requested by any of the callers.
Add an iobufs entry to RF_DagHeader_s. Use it for keeping track of buffers that get allocated from the free-list.
Add a "generic list" pool (VoidPointerListElement Pool) for elements used to maintain a list of allocated memory. [It is somewhat less than ideal to add another little pool to handle this...]
Teach rf_AllocBuffer() to use the new rf_AllocIOBuffer(). Modify other Mallocs to use rf_AllocIOBuffer(), and to update dag_h->iobufs as appropriate.
Update rf_FreeDAG() to handle cleanup of dag_h->iobufs.
While here, add some missing pool_destroy() calls for a number of pools.
With these changes, it should (in theory) be possible to swap on RAID 5 sets again. That said, I've not had any success there yet -- but the last issue I saw at least wasn't in RAIDframe. :-}
[There is room for this code to become a bit more consise, but I wanted to do a checkpoint here with something known to work :) ]
|
1.18 |
| 19-Mar-2004 |
oster | Introduce a dual-purpose pool for providing pointer and param "caches" for RF_DagNode_t's. Scale the structure size based on RF_MAXCOL. Use the new allocation method in InitNode(). Note that we can't get rid of the mallocs in there until we can prove that this new allocation method is a strict upper bound. Unless someone tries running a RAID set with 40 components, the mallocs here shouldn't shouldn't be an issue. (and if someone does make a set with 40 components they will run into other issues with other constants long before then)
|
1.17 |
| 19-Mar-2004 |
oster | Introduce 3 more pools and 6 functions to handle allocating/freeing elements from the pools.
Re-work rf_SelectAlgorithm() to get rid of all the 8 malloc's, and to use the new functions to get/put these 'support structures'. I'm not overly happy with some of the variable names, but them's the breaks.
In the process of changing things, fix a bug: - in the case where we can't create a dag, free asmh_b and blockFuncs too!!
[if you were able to look at the source code related to these changes, and comprehend what was going on without having your eyes bleed or getting dizzy, please contact me... I'm sure I'll have more code which would benefit by you having a look at it before I commit it :) ]
|
1.16 |
| 18-Mar-2004 |
oster | - Introduce a 'dagnode' pool. Initialize it and allow for cleanup. Provide rf_AllocDAGNode() and rf_FreeDAGNode() to handle allocation/freeing.
- Introduce a "nodes" linked list of RF_DagNode_t's into the DAG header. Initialize nodes in InitHdrNode(). Arrange for nodes cleanup in rf_FreeDAG().
- Add a "list_next" to RF_DagNode_t to keep track of nodes on the above "nodes" list. (This is distinct from the "next" field of RF_DagNode_t, which keeps track of the firing order of nodes.) "list_next" gets used in the cleanup routines, and in traversing through a set of nodes that belong to a particular set of nodes (e.g. those belonging to xorNodes for a given DAG).
- use rf_AllocDAGNode() instead of mallocs of variable-sized arrays of RF_DagNode_t's. Mostly mechanical changes to convert the DAG construction from "access nodes via an array index" to "access nodes via a 'nextnode' pointer".
- rework a couple of tricky spots where assumptions about the node order was being abused.
- performance remains consistent with performance before these changes.
[Thanks to Simon Burge (simonb at you.know.where) for looking over the mechanical changes to make sure I didn't biff anything.]
|
1.15 |
| 08-Mar-2004 |
oster | Move pss_pool to rf_pools. Will save a bit of extra memory at run-time, and we can only do one reconstruction at a time anyway. Nuke pss_issued_pool - move it to an internal structure in pss.
|
1.14 |
| 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.13 |
| 04-Oct-2001 |
oster | branches: 1.13.18; 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.12 |
| 28-May-2000 |
oster | branches: 1.12.4; 1.12.6; 1.12.8; In the event that an up-to-date component cannot be located for a specific position, see if there is a failed component still hanging around that we can use instead (but still mark it as failed). This leads to more reasonable behaviour (and fewer surprises!) when autoconfiguring and failed (or previously failed) components are still on the system.
|
1.11 |
| 27-Mar-2000 |
oster | branches: 1.11.2; Shuffle some prototypes to a more appropriate location.
|
1.10 |
| 26-Mar-2000 |
oster | Add bits for eventual support of deleteing components and moving hot-spares into the main set.
|
1.9 |
| 23-Feb-2000 |
oster | Correct a comment.
|
1.8 |
| 22-Feb-2000 |
oster | Add a few comments, and an indicator of whether or not an autoconfig set is 'rootable'.
|
1.7 |
| 13-Feb-2000 |
oster | Get recent changes into the tree: - make component_label variables more consistent (==> clabel) - re-work incorrect component configuration code - re-work disk configuration code - cleanup initial configuration of raidPtr info - add auto-detection of components and RAID sets (Disabled, for now) - allow / on RAID sets (Disabled, for now) - rename "config_disk_queue" to "rf_ConfigureDiskQueue" and properly prototype in rf_diskqueue.h - protect some headers with #if _KERNEL (XXX this needs to be fixed properly) and cleanup header formatting. - expand the component labels (yes, they should be backward/forward compatible) - other bits and pieces (some function names are still bogus, and will get changed soon)
|
1.6 |
| 13-May-1999 |
ad | branches: 1.6.2; Replace two instances of TNF copyright with one (was replicated for two separate contributers).
|
1.5 |
| 02-Mar-1999 |
oster | branches: 1.5.4; Update for recent changes including component label support, clean bits, rebuilding components in-place, adding hot spares, shutdownhooks, etc.
|
1.4 |
| 23-Feb-1999 |
oster | Cleanup/remove unused cruft. First kick at component labels and clean bits. Still work in progress. New code is there, but not enabled yet.
|
1.3 |
| 05-Feb-1999 |
oster | 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.5.4.1 |
| 21-Jun-1999 |
thorpej | Sync w/ -current.
|
1.6.2.1 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago A i386 GENERIC kernel compiles without the siop, ahc and bha drivers (will be updated later). i386 IDE/ATAPI and ncr work, as well as sparc/esp_sbus. alpha should work as well (untested yet). siop, ahc and bha will be updated once I've updated the branch to current -current, as well as machine-dependant code.
|
1.11.2.1 |
| 22-Jun-2000 |
minoura | Sync w/ netbsd-1-5-base.
|
1.12.8.2 |
| 11-Oct-2001 |
fvdl | Catch up with -current. Fix some bogons in the sparc64 kbd/ms attach code. cd18xx conversion provided by mrg.
|
1.12.8.1 |
| 07-Sep-2001 |
thorpej | Commit my "devvp" changes to the thorpej-devvp branch. This replaces the use of dev_t in most places with a struct vnode *.
This will form the basic infrastructure for real cloning device support (besides being architecurally cleaner -- it'll be good to get away from using numbers to represent objects).
|
1.12.6.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.12.4.1 |
| 22-Oct-2001 |
nathanw | Catch up to -current.
|
1.13.18.6 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.13.18.5 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.13.18.4 |
| 24-Jan-2005 |
skrll | Sync with HEAD.
|
1.13.18.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.13.18.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.13.18.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.19.2.1 |
| 11-Apr-2004 |
tron | Pull up revision 1.20 (requested by oster in ticket #123): These changes complete the effective removal of malloc() from all write paths within RAIDframe. They also resolve the "panics with RAID 5 sets with more than 3 components" issue which was present (briefly) in the commits which were previously supposed to address the malloc() issue. With this new code the 5-component RAID 5 set panics are now gone. It is also now also possible to swap to RAID 5. The changes made are: 1) Introduce rf_AllocStripeBuffer() and rf_FreeStripeBuffer() to allocate/free one stripe's worth of space. rf_AllocStripeBuffer() is used in rf_MapUnaccessedPortionOfStripe() where it is not sufficient to allocate memory using just rf_AllocBuffer(). rf_FreeStripeBuffer() is called from rf_FreeRaidAccDesc(), well after the DAG is finished. 2) Add a set of emergency "stripe buffers" to struct RF_Raid_s. Arrange for their initialization in rf_Configure(). In low-memory situations these buffers will be returned by rf_AllocStripeBuffer() and re-populated by rf_FreeStripeBuffer(). 3) Move RF_VoidPointerListElem_t *iobufs from the dagHeader into into struct RF_RaidAccessDesc_s. This is more consistent with the original code, and will not result in items being freed "too early". 4) Add a RF_RaidAccessDesc_t *desc to RF_DagHeader_s so that we have a way to find desc->iobufs. 5) Arrange for desc in the DagHeader to be initialized in InitHdrNode(). 6) Don't cleanup iobufs in rf_FreeDAG() -- the freeing is now delayed until rf_FreeRaidAccDesc() (which is how the original code handled the allocList, and for which there seem to be some subtle, undocumented assumptions). 7) Rename rf_AllocBuffer2() to be rf_AllocBuffer() and remove the former rf_AllocBuffer(). Fix all callers of rf_AllocBuffer(). (This was how it was *supposed* to be after the last time these changes were made, before they were backed out). 8) Remove RF_IOBufHeader and all references to it. 9) Remove desc->cleanupList and all references to it. Fixes PR#20191
|
1.20.4.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.21.2.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.22.2.2 |
| 04-Oct-2005 |
tron | Pull up following revision(s) (requested by oster in ticket #853): sys/dev/raidframe/rf_netbsdkintf.c: revision 1.190 sys/dev/raidframe/rf_netbsd.h: revision 1.24 sys/dev/raidframe/rf_states.c: revision 1.39 sys/dev/raidframe/rf_engine.c: revision 1.36 Re-work the handling of incoming I/O in RAIDframe: - introduce rf_buf_queue_check() which checks to see if there is work to do in the incoming buffer queue - rf_RaidIOThread() is now responsible for calling raidstart(), and is also now the only place that calls raidstart() - raidstrategy() now just queues requests in buf_queue and signals rf_RaidIOThread() that work has arrived Hopefully addresses PR#30233
|
1.22.2.1 |
| 17-Jun-2005 |
tron | Pull up revision 1.23 (requested by oster in ticket #472): - avoid variable shadowing - add a lot of const - remove parameters from function declarations
|
1.23.2.3 |
| 15-Nov-2007 |
yamt | sync with head.
|
1.23.2.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.23.2.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.25.2.1 |
| 15-Jan-2006 |
yamt | sync with head.
|
1.26.6.1 |
| 03-Sep-2006 |
yamt | sync with head.
|
1.26.2.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.27.34.1 |
| 19-Nov-2007 |
mjf | Sync with HEAD.
|
1.27.32.1 |
| 13-Nov-2007 |
bouyer | Sync with HEAD
|
1.27.28.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.27.26.1 |
| 14-Nov-2007 |
joerg | Sync with HEAD.
|
1.28.18.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.28.16.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.28.14.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.29.44.1 |
| 23-Jun-2013 |
tls | resync from head
|
1.29.34.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.30.36.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.30.36.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.33.4.1 |
| 19-Oct-2021 |
martin | Pull up following revision(s) (requested by oster in ticket #1361):
sys/dev/raidframe/rf_netbsd.h: revision 1.36 (via patch) sys/dev/raidframe/rf_diskqueue.c: revision 1.58 sys/dev/raidframe/rf_diskqueue.c: revision 1.59
remove unnnecessary splbio() in rf_FreeDiskQueueData()
getiobuf() can return NULL if there are no IO buffers available. RAIDframe can't deal with that, so create a dedicated pool of buffers to use for IO. PR_WAITOK is fine here, as we pre-allocate more than we need to guarantee IO can make progress. Tuning of pool still to come.
|
1.35.6.1 |
| 01-Aug-2021 |
thorpej | Sync with HEAD.
|