summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_io.c
Commit message (Collapse)AuthorAgeFilesLines
* Use an uma-zone for allocation bio requests.phk2003-05-021-13/+10
|
* Back out all the stuff that didn't belong in the last commit.phk2003-05-021-7/+1
|
* Use g_slice_spoiled() rather than g_std_spoiled().phk2003-05-021-1/+7
| | | | Remember to free the buffer we got from g_read_data().
* Time has run from the "run GEOM in userland" harness, and the new regressionphk2003-04-131-9/+0
| | | | | | | test is built to test GEOM as running in the kernel. This commit is basically "unifdef -D_KERNEL" to remove the mainly #include related code to support the userland-harness.
* Retire the experimental bio_taskqueue(), it was not quite as usable asphk2003-04-121-27/+0
| | | | | hoped. It can be revived from here, should other drivers be able to use it.
* Remove all references to BIO_SETATTR. We will not be using it.phk2003-04-031-21/+0
|
* Fix a bug in the ENOMEM pacing code which probably made it panic systemsphk2003-03-291-4/+4
| | | | after a lot of ENOMEM errors.
* Retire the GEOM private statistics code and use devstat instead.phk2003-03-181-61/+7
|
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* Don't abuse the statistics counters for detecting if we have outstandingphk2003-03-091-6/+10
| | | | | I/O requests, instead use the new dedicated fields in the consumer and provider to track this.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Implement a bio-taskqueue to reduce number of context switches inphk2003-02-111-11/+56
| | | | | | | | | | | | | | | | | | | | disk I/O processing. The intent is that the disk driver in its hardware interrupt routine will simply schedule the bio on the task queue with a routine to finish off whatever needs done. The g_up thread will then schedule this routine, the likely outcome of which is a biodone() which queues the bio on g_up's regular queue where it will be picked up and processed. Compared to the using the regular taskqueue, this saves one contextswitch. Change our scheduling of the g_up and g_down queues to be water-tight, at the cost of breaking the userland regression test-shims. Input and ideas from: scottl
* Don't short-circuit zero-length requests of they are BIO_[SG]ETATTR.phk2003-02-111-10/+18
|
* Turn the "updating" flag (back) into two sequence number fields atphk2003-02-111-4/+4
| | | | | either ends of the structure so we have a way to determine if a snapshot is consistent.
* Update the statistics collection code to track busy time instead ofphk2003-02-091-39/+41
| | | | | | | | | | idle time. Statistics now default to "on" and can be turned off with sysctl kern.geom.collectstats=0 Performance impact of statistics collection is on the order of 800 nsec per consumer/provider set on a 700MHz Athlon.
* Move the g_stat struct to its own .h file, we will export it to other code.phk2003-02-081-22/+23
| | | | | | | | | | | | | | | | | | Insted of embedding a struct g_stat in consumers and providers, merely include a pointer. Remove a couple of <sys/time.h> includes now unneeded. Add a special allocator for struct g_stat. This allocator will allocate entire pages and hand out g_stat functions from there. The "id" field indicates free/used status. Add "/dev/geom.stats" device driver whic exports the pages from the allocator to userland with mmap(2) in read-only mode. This mmap(2) interface should be considered a non-public interface and the functions in libgeom (not yet committed) should be used to access the statistics data.
* Commit the correct copy of the g_stat structure.phk2003-02-071-23/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add debug.sizeof.g_stat sysctl. Set the id field of the g_stat when we create consumers and providers. Remove biocount from consumer, we will use the counters in the g_stat structure instead. Replace one field which will need to be atomically manipulated with two fields which will not (stat.nop and stat.nend). Change add companion field to bio_children: bio_inbed for the exact same reason. Don't output the biocount in the confdot output. Fix KASSERT in g_io_request(). Add sysctl kern.geom.collectstats defaulting to off. Collect the following raw statistics conditioned on this sysctl: for each consumer and provider { total number of operations started. total number of operations completed. time last operation completed. sum of idle-time. for each of BIO_READ, BIO_WRITE and BIO_DELETE { number of operations completed. number of bytes completed. number of ENOMEM errors. number of other errors. sum of transaction time. } } API for getting hold of these statistics data not included yet.
* Rename bio_linkage to the more obvious bio_parent.phk2003-02-071-1/+1
| | | | Add bio_t0 timestamp, and include <sys/time.h> where needed
* Put the checks we perform on a bio before calling ::start in theirphk2003-02-061-69/+59
| | | | | own function, handle all validation and truncation at the time we process the bio instead of when it gets scheduled.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* white-space changesphk2002-12-261-2/+4
|
* Balk at unaligned requests.phk2002-12-181-0/+10
| | | | MFC candidate.
* malloc(9) with M_NOWAIT seems to return NULL a lot more than I would havephk2002-11-021-0/+14
| | | | | | | | | | | | | | | | | expected under -current. This is a problem for GEOM because the up/down threads cannot sleep waiting for memory to become free. The reason they cannot sleep is that paging things out to disk may be the only way we can clear up some RAM. Nice catch-22 there. Implement a rudimentary ENOMEM recovery strategy: If an I/O request fails with an error code of ENOMEM, schedule it for a retry, and tell the down-thread to sleep hz/10 to get other parts of the system a chance to free up some memory, in particular the up-path in GEOM. All caches should probably start to monitor malloc(9) failures using the new malloc_last_fail() function, and release when it indicates congestion. Sponsored by: DARPA & NAI Labs.
* Don't track bio allocation in debug output.phk2002-10-201-5/+7
| | | | Sponsored by: DARPA & NAI Labs.
* Add more KASSERTS.phk2002-10-141-1/+7
| | | | Sponsored by: DARPA & NAI Labs.
* Add support g_clone_bio() and g_std_done() to spawn multiple childrenphk2002-10-091-0/+1
| | | | | | of a bio and correctly gather status when done. Sponsored by: DARPA & NAI Labs.
* For now, don't wait for drives to stop returning EBUSY. There is toophk2002-10-081-35/+26
| | | | | | much broken harware around it seems. Sponsored by: DARPA & NAI Labs.
* Put a printf under #ifdef DIAGNOSTIC.phk2002-10-071-0/+2
| | | | Sponsored by: DARPA & NAI Labs.
* Retire g_io_fail() and let g_io_deliver() take an error argument instead.phk2002-09-301-24/+12
| | | | Sponsored by: DARPA & NAI Labs.
* Introduce g_write_data() function.phk2002-09-301-0/+18
| | | | Sponsored by: DARPA & NAI Labs
* Void functions cannot use return(foo) even if foo is also returning void.phk2002-09-281-14/+28
| | | | Sponsored by: DARPA & NAI Labs.
* Setattr should not retry on EBUSY, we could get EBUSY back becausephk2002-09-271-14/+15
| | | | | | | | | | a disklabel modification tries to change an open device, and no counter-examples exists. Be less facist about when we can do Setattr, the openmodes of devices are so loosely managed that the "exclusive" count is almost useless. Sponsored by: DARPA & NAI Labs.
* Allocate bio's with M_NOWAIT and let the caller deal with the problems.phk2002-09-271-7/+9
| | | | Sponsored by: DARPA & NAI Labs.
* Use biowait() rather than DIY.phk2002-09-131-24/+4
| | | | Sponsored by: DARPA & NAI Labs
* Don't grab Giant around malloc(9) and free(9).phk2002-05-201-6/+0
| | | | | | | | Don't grab Giant around wakeup(9). Don't print verbose messages about each device found in geom_dev. Various cleanups. Sponsored by: DARPA & NAI Labs.
* Constifixation of attribute argument to g_io_[gs]etattr()phk2002-04-091-2/+2
| | | | Sponsored by: DARPA & NAI Labs
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Centralize EOF handling and improve access controls for bio scheduling.phk2002-04-041-44/+67
| | | | Sponsored by: DARPA & NAI Labs
* Eliminate some thread pointers which do not make sense anymore.phk2002-03-261-2/+3
| | | | | Split private parts of geom.h into geom_int.h. The latter should never be included in class implemtations.
* Push BIO_FORMAT into a local hack inside the floppy drivers wherephk2002-03-261-1/+0
| | | | it belongs.
* First commit of the GEOM subsystem to make it easier for people tophk2002-03-111-0/+375
test and play with this. This is not yet production quality and should be run only on dedicated test boxes. For people who want to develop transformations for GEOM there exist a set of shims to run geom in userland (ask phk@freebsd.org). Reports of all kinds to: phk@freebsd.org Please include in report: dmesg sysctl debug.geomdot sysctl debug.geomconf Known significant limitations: no kernel dump facility. ioctls severely restricted. Sponsored by: DARPA, NAI Labs
OpenPOWER on IntegriCloud