summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_io.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't limit BIO_DELETE requests to MAXPHYS, they perform no dataphk2007-12-161-3/+2
| | | | transfers, so they are not subject to the VM system limitation.
* Save stack only when KTR_GEOM is both compiled into the kernel and enabledpjd2007-10-261-5/+5
| | | | | | | in debug.ktr.mask. Because saving stack is very expensive, it's better only to do it when one really wants to. Reported by: Dan Nelson
* Implement g_delete_data() similar to g_read_data() and g_write_data().pjd2007-05-051-0/+22
| | | | OK'ed by: phk
* Use pause() rather than tsleep() on stack variables and function pointers.jhb2007-02-271-1/+1
|
* Use tsleep() rather than msleep() with a NULL mtx parameter.jhb2007-02-231-1/+1
|
* We expect 'bio_data != NULL' for BIO_{READ,WRITE,GETATTR}, but forpjd2007-01-281-2/+7
| | | | | | BIO_{DELETE,FLUSH} we expect 'bio_data == NULL'. Reviewed by: phk
* Add a new I/O request - BIO_FLUSH, which basically tells providers below topjd2006-10-311-1/+29
| | | | | | | flush their caches. For now will mostly be used by disks to flush their write cache. Sponsored by: home.pl
* Add g_duplicate_bio() function which does the same thing what g_clone_bio()pjd2006-06-051-0/+25
| | | | is doing, but g_duplicate_bio() allocates new bio with M_WAITOK flag.
* Fix a typo.ru2006-03-131-1/+1
|
* Assert proper use of bio_caller1, bio_caller2, bio_cflags, bio_driver1,pjd2006-03-011-0/+23
| | | | | | bio_driver2 and bio_pflags fields. Reviewed by: phk
* - Add a new simple facility for marking the current thread as being in ajhb2005-09-151-30/+7
| | | | | | | | | | | | | state where sleeping on a sleep queue is not allowed. The facility doesn't support recursion but uses a simple private per-thread flag (TDP_NOSLEEPING). The sleepq_add() function will panic if the flag is set and INVARIANTS is enabled. - Use this new facility to replace the g_xup and g_xdown mutexes that were (ab)used to achieve similar behavior. - Disallow sleeping in interrupt threads when invoking interrupt handlers. MFC after: 1 week Reviewed by: phk
* Use KTR to log allocations and destructions of bios.pjd2005-08-291-0/+36
| | | | This should hopefully allow to track down "duplicate free of g_bio" panics.
* By design I left a tiny race in updating the I/O statistics based onphk2005-07-251-8/+14
| | | | | | | | | | | | the assumption that performance was more important that beancounter quality statistics. As it transpires the microoptimization is not measurable in the real world and the inconsistent statistics confuse users, so revert the decision. MT6 candidate: possibly MT5 candidate: possibly
* Add KTR_GEOM, which allows tracing of basic GEOM I/O events occuringrwatson2004-10-211-0/+26
| | | | | | in the g_up and g_down threads. Each time a bio is propelled up and down the stack, an event is generating showing the provider, offset, and length, as well as thread wakeup and work status information.
* Trace information about a buffer while we still control it.ups2004-10-111-2/+3
| | | | | Reviewed by: phk Approved by: sam (mentor)
* Don't set the BIO_ONQUEUE debugging flag until we actually put the biophk2004-10-061-1/+1
| | | | onto a queue. This made the ENOMEM handling an instant panic.
* Protect the start/end counts on consumers and providers with the up/downphk2004-09-281-28/+40
| | | | | | | mutexes. Make it possible to also protect the disk statistics (at a minor cost in performance) by setting bit 2 of kern.geom.collectstats.
* - Set maximum request size to MAXPHYS (128kB), instead of DFLPHYS (64kB).pjd2004-09-281-4/+6
| | | | | | - Set minimum request size to sectorsize, instead of 512 bytes. Approved by: phk (some time ago)
* Add more KASSERTS and checks.phk2004-08-301-0/+21
|
* Introduce g_alloc_bio() as a waiting variant of g_new_bio().phk2004-08-271-3/+12
| | | | | | | Use in places where we can sleep and where we previously failed to check for a NULL pointer. MT5 candidate.
* When sending request once again because of ENOMEM, reset bio_childrenpjd2004-08-111-0/+2
| | | | | | | | | | and bio_inbed fields to 0. Without this change we can end up with I/O leakage in some rare situations. I tested this change by putting failure probability mechanism simlar to this used in NOP class into g_clone_bio(9) function, so it was able to return NULL with the given probability. Discussed with: phk
* The g_up and g_down threads use a local 'mymutex' mutex to allow WITNESSrwatson2004-06-261-0/+16
| | | | | | | | to warn about attempts to sleep in the I/O path. This change pushes the definition and use of 'mymutex' behind #ifdef WITNESS to avoid the cost in non-debugging cases. This results in a clear .22% performance win for 512 byte and 1k I/O tests on my SMP test box. Not much, but every bit counts.
* Make the sysctl kern.geom.collectstats more granular.phk2004-06-091-8/+8
| | | | | | | | | Bit 0 controls statistics collection on GEOM providers. Bit 1 controls statistics collection on GEOM consumers. Default value is 1. Prodded by: scottl
* Calculate bio_completed properly or die!pjd2004-04-041-0/+3
| | | | Approved by: phk
* Added g_print_bio() function to print informations about given bio.pjd2004-02-111-0/+34
| | | | Approved by: phk, scottl (mentor)
* Bring back the geom_bioqueues, they _are_ a good idea.phk2004-01-281-0/+27
| | | | ATA will uses these RSN.
* Correct usage of mtx_init() API. This is not a functional change sincetruckman2003-12-071-2/+2
| | | | | | the code happened to work because MTX_DEF and NULL are both defined as 0. Reviewed by: phk
* Forgotten commit: If a provider has zero sectorsize, it is anphk2003-10-221-6/+3
| | | | | | indication of lack of media. Tripped up: peter
* Remove KASSERT check for negative bio_offsets, add "normal" EIOphk2003-10-191-1/+3
| | | | error return for same.
* Allow our bio tools to be used for local bio-chopping by not mandatingphk2003-10-061-2/+7
| | | | | a bio_from value. bio_to is still mandated (mostly for debuggign) and shall be copied from the parent bio.
* Add more KASSERTS().phk2003-09-261-0/+6
|
* Reorder a couple of KASSERTS to give more sensible messages.phk2003-09-111-2/+2
| | | | Found by: GEOM 101 class of '03
* In case we encounter a zero sectorsize provider in g_io_check(), failphk2003-08-131-0/+6
| | | | the request with a printf rather than a divide by zero error.
* Sleep on "-" in our normal state to simplify debugging.phk2003-06-181-2/+2
|
* Use __FBSDID().obrien2003-06-111-2/+2
| | | | Approved by: phk
* Hide the "ENOMEM" notice messages behind bootverbose. They are stillphk2003-05-071-1/+2
| | | | | | a valuable debugging tool for certain kinds of problems. Approved by: re/scottl
* 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.
OpenPOWER on IntegriCloud