| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Reviewed by: phk
Approved by: sam (mentor)
|
|
|
|
| |
onto a queue. This made the ENOMEM handling an instant panic.
|
|
|
|
|
|
|
| |
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 minimum request size to sectorsize, instead of 512 bytes.
Approved by: phk (some time ago)
|
| |
|
|
|
|
|
|
|
| |
Use in places where we can sleep and where we previously failed to check
for a NULL pointer.
MT5 candidate.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Bit 0 controls statistics collection on GEOM providers.
Bit 1 controls statistics collection on GEOM consumers.
Default value is 1.
Prodded by: scottl
|
|
|
|
| |
Approved by: phk
|
|
|
|
| |
Approved by: phk, scottl (mentor)
|
|
|
|
| |
ATA will uses these RSN.
|
|
|
|
|
|
| |
the code happened to work because MTX_DEF and NULL are both defined as 0.
Reviewed by: phk
|
|
|
|
|
|
| |
indication of lack of media.
Tripped up: peter
|
|
|
|
| |
error return for same.
|
|
|
|
|
| |
a bio_from value. bio_to is still mandated (mostly for debuggign) and
shall be copied from the parent bio.
|
| |
|
|
|
|
| |
Found by: GEOM 101 class of '03
|
|
|
|
| |
the request with a printf rather than a divide by zero error.
|
| |
|
|
|
|
| |
Approved by: phk
|
|
|
|
|
|
| |
a valuable debugging tool for certain kinds of problems.
Approved by: re/scottl
|
| |
|
| |
|
|
|
|
| |
Remember to free the buffer we got from g_read_data().
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
hoped. It can be revived from here, should other drivers be able to
use it.
|
| |
|
|
|
|
| |
after a lot of ENOMEM errors.
|
| |
|
|
|
|
|
| |
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
|
|
|
|
|
| |
I/O requests, instead use the new dedicated fields in the consumer and
provider to track this.
|
|
|
|
| |
Approved by: trb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
either ends of the structure so we have a way to determine if a
snapshot is consistent.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Add bio_t0 timestamp, and include <sys/time.h> where needed
|
|
|
|
|
| |
own function, handle all validation and truncation at the time we
process the bio instead of when it gets scheduled.
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
| |
|
|
|
|
| |
MFC candidate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Sponsored by: DARPA & NAI Labs.
|
|
|
|
| |
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
|
| |
of a bio and correctly gather status when done.
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
|
| |
much broken harware around it seems.
Sponsored by: DARPA & NAI Labs.
|