Commit Graph

1522 Commits

Author SHA1 Message Date
mav
9cec814411 MFC r275959: Report initiator id in portlist XML in more formalized way. 2014-12-23 12:45:29 +00:00
mav
69ac340493 MFC r275842: Do not count RCTD bit set as an error.
We can not really implement it, but specification tells that it "shall"
work, so it can be safely ignored.
2014-12-23 12:41:28 +00:00
smh
f73f068967 MFC r274819:
Prevent overflow issues in timeout processing

MFC r274852:
Fix build with asr driver

Sponsored by:	Multiplay
2014-12-21 03:06:11 +00:00
mav
a0e66849d7 MFC r275568:
Count consecutive read requests as blocking in CTL for files and ZVOLs.

Technically read requests can be executed in any order or simultaneously
since they are not changing any data.  But ZFS prefetcher goes crasy when
it receives consecutive requests from different threads.  Since prefetcher
works on level of separate blocks, instead of two consecutive 128K requests
it may receive 32 8K requests in mixed order.

This patch is more workaround then a real fix, and it does not fix all of
prefetcher problems, but it improves sequential read speed by 3-4x times
in some configurations.  On the other side it may hurt performance if
some backing store has no prefetch, that is why it is disabled by default
for raw devices.
2014-12-18 08:46:53 +00:00
mav
fe777840de MFC r275512:
In addition to r275481 allow threshold notifications work without UNMAP.

While without UNMAP support there is not much initiator can do about it,
the administrator still better be notified about the storage overflow.

Sponsored by:   iXsystems, Inc.
2014-12-18 08:45:28 +00:00
mav
57c600c3f5 MFC r275481:
Add to CTL support for threshold notifications for file-backed LUNs.

Previously it was supported only for ZVOL-backed LUNs, but now should work
for file-backed LUNs too.  Used value in this case is a space occupied by
the backing file, while available value is an available space on file
system.  Pool thresholds are still not implemented in this case.

Sponsored by:   iXsystems, Inc.
2014-12-18 08:43:36 +00:00
mav
4ff47ae9ab MFC r275474: Add GET LBA STATUS command support to CTL.
It is implemented for LUNs backed by ZVOLs in "dev" mode and files.
GEOM has no such API, so for LUNs backed by raw devices all LBAs will
be reported as mapped/unknown.

Sponsored by:   iXsystems, Inc.
2014-12-18 08:38:07 +00:00
mav
251a95deec MFC r275461:
Increase CTL ports limit from 128 to 256 and LUNs limit from 256 to 1024.

After recent optimizations this change is no longer blocked by CTL memory
consumption.  Those limits are still not free, but much cheaper now.

Relnotes:	yes
Sponsored by:	iXsystems, Inc.
2014-12-18 08:37:09 +00:00
mav
e99b295765 MFC r275459: Unify function names after r275458. 2014-12-18 08:32:56 +00:00
mav
510c6d695e MFC r275458:
Do not pre-allocate UNIT ATTENTIONs storage for every possible initiator.

Abusing ability of major UAs cover minor ones we may not account UAs for
inactive ports.  Allocate UAs storage for port and start accounting only
after some initiator from that port fetched its first POWER ON OCCURRED.

This reduces per-LUN CTL memory usage from >1MB to less then 100K.
2014-12-18 08:32:06 +00:00
mav
e998495ddf MFC r275455: Remove some unused code. 2014-12-18 08:31:13 +00:00
mav
ef698a8b3d MFC r275447:
Do not pre-allocate reservation keys memory for every possible initiator.

In configurations with many ports, like iSCSI, each LUN is typically
accessed only by limited subset of ports.  Allocating that memory on
demand allows to reduce CTL memory usage from 5.3MB/LUN to 1.3MB/LUN.
2014-12-18 08:30:28 +00:00
mav
a4403fd4b3 MFC r275405: Convert persis_offset from global variable to softc field. 2014-12-18 08:28:44 +00:00
mav
be8a551758 MFC r275404: Reduce code duplication by creating ctl_set_res_ua() helper. 2014-12-18 08:27:46 +00:00
mav
f47cf8ca42 MFC r275403: Removed unused variable and unify some names. 2014-12-18 08:27:00 +00:00
mav
08d09659c7 MFC r275365: Move ctlfe_onoffline() out of lock to let it sleep when needed.
Do some more other polishing while there.
2014-12-18 08:26:11 +00:00
mav
19cc556c2a MFC r275058: Coalesce last data move and command status for read commands.
Make CTL core and block backend set success status before initiating last
data move for read commands.  Make CAM target and iSCSI frontends detect
such condition and send command status together with data.  New I/O flag
allows to skip duplicate status sending on later fe_done() call.

For Fibre Channel this change saves one of three interrupts per read command,
increasing performance from 126K to 160K IOPS.  For iSCSI this change saves
one of three PDUs per read command, increasing performance from 1M to 1.2M
IOPS.

Sponsored by:   iXsystems, Inc.
2014-12-18 08:25:00 +00:00
mav
67f35b59b5 MFC r275032: Decouple datamove/done logic from CTL status set. 2014-12-18 08:23:59 +00:00
mav
347eb16c88 MFC r275009: Use ctl_set_success() instead of direct inlining. 2014-12-18 08:23:04 +00:00
mav
91695c330f MFC r274962: Replace home-grown CTL IO allocator with UMA.
Old allocator created significant lock congestion protecting its lists
of preallocated I/Os, while UMA provides much better SMP scalability.
The downside of UMA is lack of reliable preallocation, that could guarantee
successful allocation in non-sleepable environments.  But careful code
review shown, that only CAM target frontend really has that requirement.
Fix that making that frontend preallocate and statically bind CTL I/O for
every ATIO/INOT it preallocates any way.  That allows to avoid allocations
in hot I/O path.  Other frontends either may sleep in allocation context
or can properly handle allocation errors.

On 40-core server with 6 ZVOL-backed LUNs and 7 iSCSI client connections
this change increases peak performance from ~700K to >1M IOPS!  Yay! :)

Sponsored by:	iXsystems, Inc.
2014-12-18 08:22:16 +00:00
mav
dff991dbdf MFC r274411: Improve CAM's reaction on asymmetric access errors. 2014-12-12 07:41:08 +00:00
mav
cc4fa4df69 MFC r275478: Swap resource count scopes for used/available space.
Used count should be reported as per-LUN, while available should not.
2014-12-11 00:25:26 +00:00
mav
4875c0a205 MFC r275446: Plug memory leaks on UNMAP and XCOPY with invalid parameters. 2014-12-10 08:52:47 +00:00
mav
16ad04df25 MFC r275368:
When passing LUN IDs through treat ASCII values as fixed-length, not
interpreating NULLs as EOLs, but converting them to spaces.

SPC-4 does not tell that T10-based IDs should be NULL-terminated/padded.
And while it tells that it should include only ASCII chars (0x20-0x7F),
there are some USB sticks (SanDisk Ultra Fit), that have NULLs inside
the value.  Treating NULLs as EOLs there made those LUN IDs non-unique.
2014-12-08 09:47:49 +00:00
mav
c2a2522fc4 MFC r274805:
Make cfiscsi_offline() synchronous, waiting for connections termination
before return.  This should make ctld restart more clean and predictable.
2014-12-05 07:25:02 +00:00
mav
0d78a1c549 MFC r274795:
Close race between cfiscsi_offline() and new connection arrival.

Incoming connection should be either rejected or accepted and terminated.
2014-12-05 07:24:17 +00:00
mav
cc2f0f4af5 MFC r274785: Partially reconstruct Active/Standby clusting.
In this mode one head is in Active state, supporting all commands, while
another is in Standby state, supporting only minimal LUN discovery subset.

It is still incomplete since Standby state requires reservation support,
which is impossible to do right without having interlink between heads.
But it allows to run some basic experiments.
2014-12-05 07:23:25 +00:00
trasz
ea68673881 MFC r274703:
Fix typo.

Sponsored by:	The FreeBSD Foundation
2014-12-03 08:22:13 +00:00
trasz
eafe9cc2c3 MFC r273918:
Change the default log level for iSCSI target from 3 to 1.  It should
have been 1 from the beginning; not sure how it ended up at 3.

Sponsored by:	The FreeBSD Foundation
2014-11-30 10:36:29 +00:00
mav
d424575bb7 MFC r274756:
Remove residual xpt_release_device() call left after r272406 cleanup.

Excessive release here could trigger use-after-free condition and kernel
panic on LUN 0 disconnect.
2014-11-28 09:23:15 +00:00
mav
8eec24be06 MFC r274840, r274940:
Make iSCSI frontend less chatty while waiting for tasks termination.
2014-11-28 08:56:37 +00:00
mav
2e80dc504a MFC r274790: Remove bunch of unused lun variables. 2014-11-28 08:54:43 +00:00
mav
6625927f31 MFC r274789: Reduce race between LUN destruction and request arrival. 2014-11-28 08:53:44 +00:00
mav
6f5634bed9 MFC r274786: Log errors for absent LUNs too. 2014-11-28 08:52:38 +00:00
mav
6414b04c27 MFC r274154, r274163:
Add to CTL support for logical block provisioning threshold notifications.

For ZVOL-backed LUNs this allows to inform initiators if storage's used or
available spaces get above/below the configured thresholds.

Sponsored by:	iXsystems, Inc.
2014-11-20 01:55:12 +00:00
mav
3f382b8a2d MFC r274477: Fix check for vendor-specific peripheral qualifier.
Submitted by:	anton.rang@isilon.com
2014-11-20 01:50:46 +00:00
mav
5966236aa7 MFC r274333: Handle PREEMPT AND ABORT service action equal to PREEMPT.
With command serialization used in CTL, there are no other commands to abort
when PREEMPT AND ABORT gets to run, so it is practically equal to PREEMPT.
2014-11-16 01:47:43 +00:00
mav
862a9d976c MFC r274206:
Synchronize medium rotation rate in legacy Rigid Disk Drive Geometry mode
page with modern Block Device Characteristics VPD page.
2014-11-14 00:25:10 +00:00
mav
004861f324 MFC r274081: Fix residual copy/paste in r274080. 2014-11-11 17:18:51 +00:00
mav
2be19bde46 MFC r274080: Improve error handling around duplicate lun and port enable.
This fixes kernel panic if port enabled twice and then disabled.
2014-11-11 17:17:41 +00:00
mav
2a51a4259a MFC r274253: Fix LUN resize broken by r272911 commit. 2014-11-11 17:14:35 +00:00
gnn
52c05ed231 MFC: 273279
Add new quirks for the latest Samsung SSD, model 850.

Submitted by:	sbruno
2014-11-08 00:47:16 +00:00
mav
edabf036a2 MFC r273809:
Implement better handling for ENOSPC error for both CTL and CAM.

This makes VMWare VAAI Thin Provisioning Stun primitive activate, pausing
the virtual machine, when backing storage (ZFS pool) is getting overflowed.
2014-11-03 03:45:41 +00:00
mav
131eff3491 MFC r273730, r273731:
Reduce code duplication around Write Exclusive persistent reservation.

While there, allow some more commands to pass persistent reservation.
2014-11-03 03:44:59 +00:00
mav
58bf349623 MFC r273711:
Allocate buffer for READ BUFFER/WRITE BUFFER commands on demand.

These commands are rare, but consume additional 256KB RAM per LUN.
2014-11-03 03:43:40 +00:00
mav
9252414b60 MFC r273708: Fix support for LUN flat space addressing. 2014-11-02 17:31:45 +00:00
mav
9e735a2fb2 MFC r273693: Fix printing non-terminated strings in devlist XML. 2014-11-02 17:31:10 +00:00
mav
c9979422b8 MFC r273687:
Add "rpm" and "formfactor" LUN options to match istgt functionality.
2014-11-02 17:30:30 +00:00
mav
522da768bb MFC r273640: Add support for 12/16-byte EUI and 16-byte NAA IDs. 2014-11-02 17:29:48 +00:00
mav
db924e4c03 MFC r273075: Remove couple Copan's vendor-specific mode pages.
Those pages are highly system-/hardware-specific, the code is incomplete,
and so they hardly can be useful for anybody else.
2014-11-02 17:28:44 +00:00