freebsd-dev/sys
Alexander Motin 40ea77a036 Merge GEOM direct dispatch changes from the projects/camlock branch.
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
2013-10-22 08:22:19 +00:00
..
amd64 Add a new capability, VM_CAP_ENABLE_INVPCID, that can be enabled to expose 2013-10-16 18:20:27 +00:00
arm Make watchdog function conform watchdog(9): 2013-10-22 05:22:46 +00:00
boot Add configuration for the Freescale i.MX53 Quick Start Board. 2013-10-20 21:21:07 +00:00
bsm Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
cam Merge GEOM direct dispatch changes from the projects/camlock branch. 2013-10-22 08:22:19 +00:00
cddl Merge GEOM direct dispatch changes from the projects/camlock branch. 2013-10-22 08:22:19 +00:00
compat Add padding to match the compat32 struct stat32 definition to the real 2013-10-04 22:05:23 +00:00
conf Remove the isf(4) driver. It was created by accident and is subset of 2013-10-21 22:43:38 +00:00
contrib Update firmware for run(4) to version 0.33. 2013-10-18 07:40:50 +00:00
crypto Use the fact that the AES-NI instructions can be pipelined to improve 2013-09-03 18:31:23 +00:00
ddb
dev Merge GEOM direct dispatch changes from the projects/camlock branch. 2013-10-22 08:22:19 +00:00
fs Similar to debug.iosize_max_clamp sysctl, introduce 2013-10-15 06:33:10 +00:00
gdb
geom Merge GEOM direct dispatch changes from the projects/camlock branch. 2013-10-22 08:22:19 +00:00
gnu/fs/reiserfs
i386 Document XENHVM and xenpci are mutually inclusive. 2013-10-11 19:40:28 +00:00
ia64 The pmap function pmap_clear_reference() is no longer used. Remove it. 2013-09-20 04:30:18 +00:00
isa
kern Merge GEOM direct dispatch changes from the projects/camlock branch. 2013-10-22 08:22:19 +00:00
kgssapi
libkern Fix ixp425 boot2 with ARM EABI: 2013-09-29 15:19:34 +00:00
mips Remove the isf(4) driver. It was created by accident and is subset of 2013-10-21 22:43:38 +00:00
modules Don't build krping.ko, iw_cxgb.ko, and iw_cxgbe.ko, if MK_OFED=no 2013-10-18 09:17:35 +00:00
net Add a note that lacp_compose_key() should be updated, when new media 2013-10-21 07:49:36 +00:00
net80211 Fix the "am I a net80211 vap" check for bpf listeners. 2013-10-10 19:56:31 +00:00
netatalk Remove ifa_init() and provide ifa_alloc() that will allocate and setup 2013-10-15 10:31:42 +00:00
netgraph Improve locking model used to protect netgraph topology: 2013-10-15 17:44:35 +00:00
netinet - Add parentheses to all internet addresses 2013-10-19 18:13:32 +00:00
netinet6 - Utilize counter(9) to accumulate statistics on interface addresses. Add 2013-10-15 11:37:57 +00:00
netipsec Remove most of the remaining sysctl name list macros. They were only 2013-08-26 18:16:05 +00:00
netipx Remove ifa_init() and provide ifa_alloc() that will allocate and setup 2013-10-15 10:31:42 +00:00
netnatm Fix the length calculation for the final block of a sendfile(2) 2013-09-10 10:05:59 +00:00
netpfil Use the correct EtherType for logging IPv6 packets. 2013-09-28 15:49:36 +00:00
netsmb Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
nfs
nfsclient
nfsserver Change the cap_rights_t type from uint64_t to a structure that we can extend 2013-09-05 00:09:56 +00:00
nlm Intermittent crashes in the NLM (rpc.lockd) code during system 2013-09-06 23:14:31 +00:00
ofed Fix resource free. 2013-10-17 12:19:36 +00:00
opencrypto Make sendfile() a method in the struct fileops. Currently only 2013-08-15 07:54:31 +00:00
pc98 MFi386: r254619 2013-08-22 16:39:59 +00:00
pci Add preliminary support for RTL8106E PCIe FastEthernet. 2013-10-21 06:27:20 +00:00
powerpc Make hard-wired TLB allocations be at minimum one page. This is required by 2013-10-21 22:25:54 +00:00
rpc It was reported via email that the cu_sent field used by the 2013-09-06 02:34:34 +00:00
security Fix some typos that were causing probe argument types to show up as unknown. 2013-10-01 15:40:27 +00:00
sparc64 Implement GET_STACK_USAGE. 2013-09-29 13:09:25 +00:00
sys Merge GEOM direct dispatch changes from the projects/camlock branch. 2013-10-22 08:22:19 +00:00
teken
tools
ufs Allow kernels without options SOFTUPDATES to build. This should fix the 2013-10-21 20:51:08 +00:00
vm Tidy up the output of "sysctl vm.phys_free". 2013-10-10 16:11:45 +00:00
x86 Add a va_copy() to our fall-back stdarg implementation for use with lint(1) 2013-10-07 10:01:23 +00:00
xdr
xen Remove redundant redeclaration of gdtset in sys/xen/xen-os.h, to silence 2013-10-18 17:06:13 +00:00
Makefile