freebsd-nq/sys
Conrad Meyer fe8712f84a ioat(4): Block asynchronous work during HW reset
Fix the race between ioat_reset_hw and ioat_process_events.

HW reset isn't protected by a lock because it can sleep for a long time
(40.1 ms).  This resulted in a race where we would process bogus parts
of the descriptor ring as if it had completed.  This looked like
duplicate completions on old events, if your ring had looped at least
once.

Block callout and interrupt work while reset runs so the completion end
of things does not observe indeterminate state and process invalid parts
of the ring.

Start the channel with a manually implemented ioat_null() to keep other
submitters quiesced while we wait for the channel to start (100 us).

r295605 may have made the race between ioat_reset_hw and
ioat_process_events wider, but I believe it already existed before that
revision.  ioat_process_events can be invoked by two asynchronous
sources: callout (softclock) and device interrupt.  Those could race
each other, to the same effect.

Reviewed by:	markj
Approved by:	re
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7097
2016-07-05 20:53:32 +00:00
..
amd64 Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00
arm Revert the recent armv6 changes to ALIGNED_POINTER(), restoring the 2016-06-21 17:53:42 +00:00
arm64 ARM64: fix DMAP calculation 2016-06-30 04:58:19 +00:00
boot boot1.efi: fix assignment / comparison expression 2016-07-04 16:50:21 +00:00
bsm
cam Correct PERSISTENT RESERVE OUT command and populate scsi_cmd->length. 2016-06-29 16:41:37 +00:00
cddl Revert r299454 and r299448. 2016-06-30 14:55:49 +00:00
compat Fix a bug introduced in r283433. 2016-06-26 16:59:59 +00:00
conf Update 11.0 to ALPHA6. 2016-07-01 00:00:35 +00:00
contrib Remove SoC-specific integrations from dTSEC, to make it SoC agnostic. 2016-07-05 06:16:42 +00:00
crypto Connect the SHA-512t256 and Skein hashing algorithms to ZFS 2016-05-31 04:12:14 +00:00
ddb Add a small set of logical operators to DDB command language. 2016-05-16 19:42:38 +00:00
dev ioat(4): Block asynchronous work during HW reset 2016-07-05 20:53:32 +00:00
fs Rewrite sigdeferstop(9) and sigallowstop(9) into more flexible 2016-06-26 20:07:24 +00:00
gdb
geom 1.Improve handling around last compressed block of the file, which is 2016-06-29 18:19:05 +00:00
gnu Revert changes for local testing, inadvertantly commited in r300811. 2016-05-26 23:59:42 +00:00
i386 Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00
isa sys/isa: minor spelling fixes. 2016-05-03 21:51:52 +00:00
kern The paradigm of a callout is that it has three consequent states: 2016-07-05 18:47:17 +00:00
kgssapi kgssapi: insignificant spelling fix. 2016-05-03 22:05:03 +00:00
libkern sys: Make use of our rounddown() macro when sys/param.h is available. 2016-04-30 14:41:18 +00:00
mips Fixed FreeBSD/mips MALTA support for QEMU 2016-06-29 23:33:44 +00:00
modules WITH_META_MODE: Avoid false-positive error due to missing .meta with build commands. 2016-06-29 22:39:22 +00:00
net Several device drivers call if_alloc() and then do further checks and 2016-06-29 05:21:25 +00:00
net80211 [net80211] teach AMRR to log the initial MCS rate as "MCS X" 2016-07-01 19:58:13 +00:00
netgraph Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00
netinet This patch fixes two bugs related to the setting of the I-Bit 2016-06-30 06:06:35 +00:00
netinet6 Don't consider the socket when processing an incoming ICMP/ICMP6 packet, 2016-06-23 09:13:15 +00:00
netipsec Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00
netnatm kernel: use our nitems() macro when it is available through param.h. 2016-04-19 23:48:27 +00:00
netpfil Fix a race condition between the main thread in aqm_pie_cleanup() and the 2016-07-05 00:53:01 +00:00
netsmb sys/net*: minor spelling fixes. 2016-05-03 18:05:43 +00:00
nfs NFS: spelling fixes on comments. 2016-04-29 16:07:25 +00:00
nfsclient
nfsserver
nlm When sleeping waiting for either local or remote advisory lock, 2016-06-26 20:08:42 +00:00
ofed Fix bug in iwcm that caused a panic in iw_cm_wq when krping is run 2016-06-14 20:58:05 +00:00
opencrypto sys/opencrypto: minor spelling fixes. 2016-05-06 23:37:19 +00:00
pc98 Move 'device pci' for the PCI bus driver to the MI NOTES file. 2016-04-29 23:53:55 +00:00
powerpc Remove SoC-specific integrations from dTSEC, to make it SoC agnostic. 2016-07-05 06:16:42 +00:00
riscv Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00
rpc Deobfuscate cleanup path in clnt_bck_create(..) 2016-06-10 17:53:28 +00:00
security Implement AUE_PREAD and AUE_PWRITE BSM conversion support, eliminating 2016-06-13 09:22:20 +00:00
sparc64 Update comments for the MD functions managing contexts for new 2016-06-16 12:05:44 +00:00
sys The paradigm of a callout is that it has three consequent states: 2016-07-05 18:47:17 +00:00
teken
tests
tools
ufs arc4random() returns 0 to (2**32)−1, use an alternative to initialize 2016-05-22 14:31:20 +00:00
vm Clarify the vnode_destroy_vobject() logic handling for already terminated 2016-07-05 11:21:02 +00:00
x86 Add a tunable to disable migration of MSI-X interrupts. 2016-06-24 22:49:32 +00:00
xdr RPC: for pointers replace 0 with NULL. 2016-04-14 17:06:37 +00:00
xen xen: Correct typo in #undef for symbol NBPL 2016-06-06 14:55:46 +00:00
Makefile