| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the BIO_ORDERED flag for struct bio and update bio clients to use it.
The barrier semantics of bioq_insert_tail() were broken in two ways:
o In bioq_disksort(), an added bio could be inserted at the head of
the queue, even when a barrier was present, if the sort key for
the new entry was less than that of the last queued barrier bio.
o The last_offset used to generate the sort key for newly queued bios
did not stay at the position of the barrier until either the
barrier was de-queued, or a new barrier (which updates last_offset)
was queued. When a barrier is in effect, we know that the disk
will pass through the barrier position just before the
"blocked bios" are released, so using the barrier's offset for
last_offset is the optimal choice.
sys/geom/sched/subr_disk.c:
sys/kern/subr_disk.c:
o Update last_offset in bioq_insert_tail().
o Only update last_offset in bioq_remove() if the removed bio is
at the head of the queue (typically due to a call via
bioq_takefirst()) and no barrier is active.
o In bioq_disksort(), if we have a barrier (insert_point is non-NULL),
set prev to the barrier and cur to it's next element. Now that
last_offset is kept at the barrier position, this change isn't
strictly necessary, but since we have to take a decision branch
anyway, it does avoid one, no-op, loop iteration in the while
loop that immediately follows.
o In bioq_disksort(), bypass the normal sort for bios with the
BIO_ORDERED attribute and instead insert them into the queue
with bioq_insert_tail(). bioq_insert_tail() not only gives
the desired command order during insertion, but also provides
barrier semantics so that commands disksorted in the future
cannot pass the just enqueued transaction.
sys/sys/bio.h:
Add BIO_ORDERED as bit 4 of the bio_flags field in struct bio.
sys/cam/ata/ata_da.c:
sys/cam/scsi/scsi_da.c
Use an ordered command for SCSI/ATA-NCQ commands issued in
response to bios with the BIO_ORDERED flag set.
sys/cam/scsi/scsi_da.c
Use an ordered tag when issuing a synchronize cache command.
Wrap some lines to 80 columns.
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
sys/geom/geom_io.c
Mark bios with the BIO_FLUSH command as BIO_ORDERED.
Sponsored by: Spectra Logic Corporation
MFC after: 1 month
|
|
|
|
|
| |
Found with: Coverity Prevent
CID: 3566, 3567
|
|
|
|
|
|
|
|
| |
Previsouly this condition was reported with EIO by bio_offset > mediasize
check.
Perhaps that check should be extended to bio_offset+bio_length > mediasize.
MFC after: 1 week
|
|
|
|
| |
Reviewed by: pjd, phk
|
| |
|
|
|
|
|
|
| |
Remove msleep() timeout from g_io_schedule_up/down(). It works fine
without it, saving few percents of CPU on high request rates without
need to rearm callout twice per request.
|
|
|
|
|
|
|
| |
Previously, it would panic immediately.
Reviewed by: pjd
Approved by: re (kib)
|
|
|
|
|
|
|
| |
struct bio to store classification information, and a hook
for classifier functions that can be called by g_io_request().
This code is from Fabio Checconi as part of his GSOC work.
|
|
|
|
|
| |
Reviewed by: Scott Long
MFC after: 2 days
|
|
|
|
| |
transfers, so they are not subject to the VM system limitation.
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
OK'ed by: phk
|
| |
|
| |
|
|
|
|
|
|
| |
BIO_{DELETE,FLUSH} we expect 'bio_data == NULL'.
Reviewed by: phk
|
|
|
|
|
|
|
| |
flush their caches. For now will mostly be used by disks to flush their
write cache.
Sponsored by: home.pl
|
|
|
|
| |
is doing, but g_duplicate_bio() allocates new bio with M_WAITOK flag.
|
| |
|
|
|
|
|
|
| |
bio_driver2 and bio_pflags fields.
Reviewed by: phk
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This should hopefully allow to track down "duplicate free of g_bio" panics.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|