| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
further refinement is required as some device drivers intended to be
portable over FreeBSD versions rely on __FreeBSD_version to decide whether
to include capability.h.
MFC after: 3 weeks
Notes:
svn path=/head/; revision=263233
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Logical sector size is measured in words, not bytes.
- If physical sector is not bigger then logical sector, it does not mean
it should be set equal to 512 bytes, but set to logical sector.
PR: misc/187269
Submitted by: Ravi Pokala <rpokala@panasas.com>
MFC after: 1 week
Notes:
svn path=/head/; revision=262886
|
|
|
|
|
|
|
|
|
|
| |
hangs with Open-iSCSI (Linux).
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=262837
|
|
|
|
|
|
|
|
|
|
|
| |
with Hyper-V Failover Cluster.
Reviewed by: ken@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=262782
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=262741
|
|
|
|
|
|
|
|
|
| |
by the underlying device.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=261538
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The latest draft of SBC-3 tells: "A MAXIMUM UNMAP LBA COUNT field set to
a non-zero value indicates the maximum number of LBAs that may be unmapped
by an UNMAP command." To me it does not sound like that limit is set per
single descriptor, but rather per all command. And I have at least one
device that behaves exactly that way. This patch fixes the problem there.
MFC after: 1 week
Notes:
svn path=/head/; revision=261042
|
|
|
|
|
|
|
|
|
| |
allocate bus scan CCB.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=260996
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
originally.
I am not sure why exactly have I moved it during one of many refactorings
during camlock project, but obviously it opens race window that may cause
use after free panics during SIM (in reported cases umass(4)) detach.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=260549
|
|
|
|
|
|
|
| |
CAM_DEV_QFREEZE flag is still there and it will freeze device again.
Notes:
svn path=/head/; revision=260547
|
|
|
|
|
|
|
|
| |
Otherwise periph may be invalidated and freed before single-stepping freeze
is dropped, causing use after free panic.
Notes:
svn path=/head/; revision=260541
|
|
|
|
|
|
|
|
|
| |
It was equal before r259397, but for good or bad, not any more for LUNs.
This change fixes at least CAM debugging.
Notes:
svn path=/head/; revision=260509
|
|
|
|
| |
Notes:
svn path=/head/; revision=260407
|
|
|
|
|
|
|
|
|
|
| |
Correct missing \n's in xpt_print's
Correct incorrect count being passed to short delete xpt_print
MFC after: 1 week
Notes:
svn path=/head/; revision=260267
|
|
|
|
|
|
|
|
|
|
|
|
| |
support all valid SAM-5 LUN IDs. CAM_VERSION is bumped, as the CAM ABI
(though not API) is changed. No behavior is changed relative to r257345
except that LUNs with non-zero high 32 bits will no longer be ignored
during device enumeration for SIMs that have set PIM_EXTLUNS.
Reviewed by: scottl
Notes:
svn path=/head/; revision=259397
|
|
|
|
|
|
|
|
|
|
|
| |
(like NAA assigned) and identify the same entity (like device or port).
Otherwise there can be false positives since at least some models of
Seagate disks use same IDs for the whole device and one of its ports.
MFC after: 2 weeks
Notes:
svn path=/head/; revision=259108
|
|
|
|
|
|
|
|
|
|
|
| |
LUN backed by non-disk device, e.g. /dev/null.
Reviewed by: ken (earlier version)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=258871
|
|
|
|
|
|
|
|
|
|
|
| |
In its stead use the Solaris / illumos approach of emulating '-' (dash)
in probe names with '__' (two consecutive underscores).
Reviewed by: markj
MFC after: 3 weeks
Notes:
svn path=/head/; revision=258622
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
option, unbreak the lock tracing release semantic by embedding
calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined
version of the releasing functions for mutex, rwlock and sxlock.
Failing to do so skips the lockstat_probe_func invokation for
unlocking.
- As part of the LOCKSTAT support is inlined in mutex operation, for
kernel compiled without lock debugging options, potentially every
consumer must be compiled including opt_kdtrace.h.
Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the
dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES
is linked there and it is only used as a compile-time stub [0].
[0] immediately shows some new bug as DTRACE-derived support for debug
in sfxge is broken and it was never really tested. As it was not
including correctly opt_kdtrace.h before it was never enabled so it
was kept broken for a while. Fix this by using a protection stub,
leaving sfxge driver authors the responsibility for fixing it
appropriately [1].
Sponsored by: EMC / Isilon storage division
Discussed with: rstone
[0] Reported by: rstone
[1] Discussed with: philip
Notes:
svn path=/head/; revision=258541
|
|
|
|
|
|
|
|
|
| |
reducing global CTL lock scope and congestion.
While there, simplify CTL I/O pools KPI, hiding implementation details.
Notes:
svn path=/head/; revision=257946
|
|
|
|
|
|
|
|
|
|
| |
- Fix LOR and possible lock recursion when handling high-power commands.
Introduce new lock to protect left power quota and list of frozen devices.
- Correct locking around xpt periph creation.
- Remove seems never used XPT_FLAG_OPEN xpt periph flag.
Notes:
svn path=/head/; revision=257914
|
|
|
|
|
|
|
|
| |
MFC after: 2 Days
X-MFC-With: r256956
Notes:
svn path=/head/; revision=257831
|
|
|
|
| |
Notes:
svn path=/head/; revision=257482
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=257382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the upper 32-bits of the LUN, if possible, into the target_lun field as
passed directly from the REPORT LUNs response. This allows extended LUN
support to work for all LUNs with zeros in the lower 32-bits, which covers
most addressing modes without breaking KBI. Behavior for drivers not
setting PIM_EXTLUNS is unchanged. No user-facing interfaces are modified.
Extended LUNs are stored with swizzled 16-bit word order so that, for
devices implementing LUN addressing (like SCSI-2), the numerical
representation of the LUN is identical with and without PIM_EXTLUNS. Thus
setting PIM_EXTLUNS keeps most behavior, and user-facing LUN IDs, unchanged.
This follows the strategy used in Solaris. A macro (CAM_EXTLUN_BYTE_SWIZZLE)
is provided to transform a lun_id_t into a uint64_t ordered for the wire.
This is the second part of work for full 64-bit extended LUN support and is
designed to a bridge for stable/10 to the final 64-bit LUN code. The
third and final part will involve widening lun_id_t to 64 bits and will
not be MFCed. This third part will break the KBI but will keep the KPI
unchanged so that all drivers that will care about this can be updated now
and not require code changes between HEAD and stable/10.
Reviewed by: scottl
MFC after: 2 weeks
Notes:
svn path=/head/; revision=257345
|
|
|
|
|
|
|
|
|
| |
- Replace ordered_tag_count counter with single flag;
- From da remove outstanding_cmds counter, duplicating pending_ccbs list;
- From da_softc remove unused links field.
Notes:
svn path=/head/; revision=257054
|
|
|
|
|
|
|
|
|
|
| |
On my tests this improves performance of the new iSCSI target backed by
GEOM STRIPE of SSDs from 75K to 110K IOPS.
Reviewed by: ken
Notes:
svn path=/head/; revision=256995
|
|
|
|
| |
Notes:
svn path=/head/; revision=256975
|
|
|
|
|
|
|
| |
This fixes race condition with cam_periph_ccbwait(), causing use-after-free.
Notes:
svn path=/head/; revision=256960
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
information.
The existing algorithm selects a preferred leaf vdev based on offset of the zio
request modulo the number of members in the mirror. It assumes the devices are
of equal performance and that spreading the requests randomly over both drives
will be sufficient to saturate them. In practice this results in the leaf vdevs
being under utilized.
The new algorithm takes into the following additional factors:
* Load of the vdevs (number outstanding I/O requests)
* The locality of last queued I/O vs the new I/O request.
Within the locality calculation additional knowledge about the underlying vdev
is considered such as; is the device backing the vdev a rotating media device.
This results in performance increases across the board as well as significant
increases for predominantly streaming loads and for configurations which don't
have evenly performing devices.
The following are results from a setup with 3 Way Mirror with 2 x HD's and
1 x SSD from a basic test running multiple parrallel dd's.
With pre-fetch disabled (vfs.zfs.prefetch_disable=1):
== Stripe Balanced (default) ==
Read 15360MB using bs: 1048576, readers: 3, took 161 seconds @ 95 MB/s
== Load Balanced (zfslinux) ==
Read 15360MB using bs: 1048576, readers: 3, took 297 seconds @ 51 MB/s
== Load Balanced (locality freebsd) ==
Read 15360MB using bs: 1048576, readers: 3, took 54 seconds @ 284 MB/s
With pre-fetch enabled (vfs.zfs.prefetch_disable=0):
== Stripe Balanced (default) ==
Read 15360MB using bs: 1048576, readers: 3, took 91 seconds @ 168 MB/s
== Load Balanced (zfslinux) ==
Read 15360MB using bs: 1048576, readers: 3, took 108 seconds @ 142 MB/s
== Load Balanced (locality freebsd) ==
Read 15360MB using bs: 1048576, readers: 3, took 48 seconds @ 320 MB/s
In addition to the performance changes the code was also restructured, with
the help of Justin Gibbs, to provide a more logical flow which also ensures
vdevs loads are only calculated from the set of valid candidates.
The following additional sysctls where added to allow the administrator
to tune the behaviour of the load algorithm:
* vfs.zfs.vdev.mirror.rotating_inc
* vfs.zfs.vdev.mirror.rotating_seek_inc
* vfs.zfs.vdev.mirror.rotating_seek_offset
* vfs.zfs.vdev.mirror.non_rotating_inc
* vfs.zfs.vdev.mirror.non_rotating_seek_inc
These changes where based on work started by the zfsonlinux developers:
https://github.com/zfsonlinux/zfs/pull/1487
Reviewed by: gibbs, mav, will
MFC after: 2 weeks
Sponsored by: Multiplay
Notes:
svn path=/head/; revision=256956
|
|
|
|
|
|
|
| |
Coverity CID: 1054773
Notes:
svn path=/head/; revision=256895
|
|
|
|
|
|
|
|
|
|
|
|
| |
cam_periph_acquire() can return error if periph already invalidated, but
that may be unacceptable and cause deadlock if the invalidated periph can't
be destroyed without "executing" the scheduled request.
Coverity CID: 1109822
MFC after: 2 months
Notes:
svn path=/head/; revision=256888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When safety requirements are met, it allows to avoid passing I/O requests
to GEOM g_up/g_down thread, executing them directly in the caller context.
That allows to avoid CPU bottlenecks in g_up/g_down threads, plus avoid
several context switches per I/O.
The defined now safety requirements are:
- caller should not hold any locks and should be reenterable;
- callee should not depend on GEOM dual-threaded concurency semantics;
- on the way down, if request is unmapped while callee doesn't support it,
the context should be sleepable;
- kernel thread stack usage should be below 50%.
To keep compatibility with GEOM classes not meeting above requirements
new provider and consumer flags added:
- G_CF_DIRECT_SEND -- consumer code meets caller requirements (request);
- G_CF_DIRECT_RECEIVE -- consumer code meets callee requirements (done);
- G_PF_DIRECT_SEND -- provider code meets caller requirements (done);
- G_PF_DIRECT_RECEIVE -- provider code meets callee requirements (request).
Capable GEOM class can set them, allowing direct dispatch in cases where
it is safe. If any of requirements are not met, request is queued to
g_up or g_down thread same as before.
Such GEOM classes were reviewed and updated to support direct dispatch:
CONCAT, DEV, DISK, GATE, MD, MIRROR, MULTIPATH, NOP, PART, RAID, STRIPE,
VFS, ZERO, ZFS::VDEV, ZFS::ZVOL, all classes based on g_slice KPI (LABEL,
MAP, FLASHMAP, etc).
To declare direct completion capability disk(9) KPI got new flag equivalent
to G_PF_DIRECT_SEND -- DISKFLAG_DIRECT_COMPLETION. da(4) and ada(4) disk
drivers got it set now thanks to earlier CAM locking work.
This change more then twice increases peak block storage performance on
systems with manu CPUs, together with earlier CAM locking changes reaching
more then 1 million IOPS (512 byte raw reads from 16 SATA SSDs on 4 HBAs to
256 user-level threads).
Sponsored by: iXsystems, Inc.
MFC after: 2 months
Notes:
svn path=/head/; revision=256880
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reduce lock congestion and improve SMP scalability of the SCSI/ATA stack,
preparing the ground for the coming next GEOM direct dispatch support.
Replace big per-SIM locks with bunch of smaller ones:
- per-LUN locks to protect device and peripheral drivers state;
- per-target locks to protect list of LUNs on target;
- per-bus locks to protect reference counting;
- per-send queue locks to protect queue of CCBs to be sent;
- per-done queue locks to protect queue of completed CCBs;
- remaining per-SIM locks now protect only HBA driver internals.
While holding LUN lock it is allowed (while not recommended for performance
reasons) to take SIM lock. The opposite acquisition order is forbidden.
All the other locks are leaf locks, that can be taken anywhere, but should
not be cascaded. Many functions, such as: xpt_action(), xpt_done(),
xpt_async(), xpt_create_path(), etc. are no longer require (but allow) SIM
lock to be held.
To keep compatibility and solve cases where SIM lock can't be dropped, all
xpt_async() calls in addition to xpt_done() calls are queued to completion
threads for async processing in clean environment without SIM lock held.
Instead of single CAM SWI thread, used for commands completion processing
before, use multiple (depending on number of CPUs) threads. Load balanced
between them using "hash" of the device B:T:L address.
HBA drivers that can drop SIM lock during completion processing and have
sufficient number of completion threads to efficiently scale to multiple
CPUs can use new function xpt_done_direct() to avoid extra context switch.
Make ahci(4) driver to use this mechanism depending on hardware setup.
Sponsored by: iXsystems, Inc.
MFC after: 2 months
Notes:
svn path=/head/; revision=256843
|
|
|
|
|
|
|
| |
Remove hard limit on number of BIOs handled with one ATA TRIM request.
Notes:
svn path=/head/; revision=256836
|
|
|
|
|
|
|
|
|
|
| |
Print message containing device model and serial number on invalidation.
Requested by: glebius
MFC after: 1 week
Notes:
svn path=/head/; revision=256552
|
|
|
|
| |
Notes:
svn path=/head/; revision=256547
|
|
|
|
|
|
|
|
|
|
|
| |
useful for system administration to have in hard copy (in logs) if one of
several devices suddenly dies.
Requested by: glebius
MFC after: 1 week
Notes:
svn path=/head/; revision=256533
|
|
|
|
|
|
|
|
| |
Approved by: re (gjb)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256201
|
|
|
|
|
|
|
|
|
|
| |
difference.
Approved by: re (gjb)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256197
|
|
|
|
|
|
|
|
|
|
| |
shouldn't make any functional difference.
Approved by: re (gjb)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
registered simultaneously. Due to topology unlock between the ID allocation
and the bus registration there is a chance that two buses may get the
same IDs. That is supposed reason of lock assertion panic in CAM during
initial bus scanning after new iscsid initiates two sessions same time.
Reported by: trasz
Approved by: re (glebus, marius)
MFC after: 2 weeks
Notes:
svn path=/head/; revision=256188
|
|
|
|
|
|
|
|
|
|
|
|
| |
fortunately
nothing seems to actually use this feature, but it's required by standard.
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256187
|
|
|
|
|
|
|
|
| |
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256163
|
|
|
|
|
|
|
|
| |
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256065
|
|
|
|
|
|
|
|
|
|
| |
UMA_ZONE_NOFREE that caused another leak when unloading the module.
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation
Notes:
svn path=/head/; revision=256058
|
|
|
|
|
|
|
|
|
|
|
|
| |
CAM_EXTLUN_VALID is not erroneously set. Also add an XPORT_SRP
identifier to the known SCSI transports for the SCSI RDMA protocol, as
used, for example with Infiniband storage.
Reviewed by: scottl
Approved by: re (marius)
Notes:
svn path=/head/; revision=255915
|
|
|
|
|
|
|
|
|
|
|
| |
original, this hides the contents of cam_compat.h from ktrace/kdump/truss,
avoiding problems there. There are no user-servicable parts in there, so
no need for those tools to be groping around in there.
Approved by: re
Notes:
svn path=/head/; revision=255870
|
|
|
|
|
|
|
| |
Approved by: re (implicit)
Notes:
svn path=/head/; revision=255865
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0;
MPSAFE drivers should be managing their own timeout storage. The
remaining non-MPSAFE drivers have been modified to also manage their own
storage, and should be considered for updating to MPSAFE (or removal)
during the FreeBSD 10.x lifecycle.
- Add fields related to soft timeouts and quality of service, to be used
in upcoming work.
- Add room for more flags in the CCB header and path_inq structures.
- Begin support for extended 64-bit LUNs.
- Bump the CAM version number to 0x18, but add compat shims. Tested with
camcontrol and smartctl.
Reviewed by: nathanw, ken, kib
Approved by: re
Obtained from: Netflix
Notes:
svn path=/head/; revision=255853
|