freebsd-nq/sys
Andriy Gapon 3d9a0e564d MFV r323110: 8558 lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems
illumos/illumos-gate@216d7723a1
216d7723a1

https://www.illumos.org/issues/8558
  On a system with more than 80K ZFS filesystems, we've seen cases where
  lwp_create() will start to fail by returning EAGAIN. The problem being,
  for each of those 80K ZFS filesystems, a taskq will be created for each
  dataset as part of the ZIL for each dataset.
  For each of these taskq's, a kernel thread will be created which results
  in 24KB being allocated for each thread. With enough of these 24KB
  allocations, we eventually exhaust the memory region set aside for these
  allocations. Currently, segkpsize is set to a value of 2GB, which means
  we can only support about 80K filesystems; 2GB / 24KB = ~80K.
  The lwp_create() failure comes into play due to the fact that LWP
  creation also allocates 24KB from this same region of memory. Thus, if
  we've exhausted this region of memory due to the number of ZIL taskq's,
  there won't be any memory avaible to allow the call to lwp_create() to
  succeed.

FreeBSD note: I haven't created sysctl-s for the new ZIL clean
parameters.  Let's add them if anyone requires to tune them.

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>
MFC after:	3 weeks
2017-09-11 11:31:43 +00:00
..
amd64 Add smn(4) driver for AMD System Management Network 2017-09-05 15:13:41 +00:00
arm Add gpio methods to read/write/configure up to 32 pins simultaneously. 2017-09-10 18:08:25 +00:00
arm64 Enable compilation of Marvell NETA controller with arm64 GENERIC 2017-09-09 11:56:48 +00:00
boot r323389 breaks the kernel build when WITHOUT_ZFS is defined in src.conf 2017-09-11 07:38:53 +00:00
bsm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
cam cam(4): Fix some warnings 2017-09-07 07:24:22 +00:00
cddl MFV r323110: 8558 lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems 2017-09-11 11:31:43 +00:00
compat Only search the scope ID in ip6_find_dev() for IPv6 addresses which 2017-09-09 12:50:12 +00:00
conf newvers.sh: speed up failing git-svn revision search 2017-09-11 00:14:04 +00:00
contrib Merge pipes and socket pairs. 2017-09-05 07:46:45 +00:00
crypto aesni: quiet -Wcast-qual 2017-08-16 22:54:35 +00:00
ddb Rename mkdumpheader() and group EKCD functions in kern_shutdown.c. 2017-08-18 04:04:09 +00:00
dev Improve HW type checking in mv_ehci driver 2017-09-11 10:41:42 +00:00
fs Style. 2017-08-28 21:04:56 +00:00
gdb
geom Fix information leak in geli(8) integrity mode 2017-09-09 01:41:01 +00:00
gnu Update DTS files from Linux 4.12 2017-07-09 13:53:32 +00:00
i386 Revert r323087 2017-09-01 17:03:48 +00:00
isa Use better hard-coded defaults for the cursor shape, and remove nearby 2017-08-19 19:33:16 +00:00
kern To analyze the allocation of swap blocks by blist functions, add a method 2017-09-10 17:46:03 +00:00
kgssapi
libkern x86/crc32_sse42.c: quiet unused function warning 2017-08-11 17:05:31 +00:00
mips Enable dtrace support for mips64 and the ERL kernel config 2017-09-06 03:19:52 +00:00
modules Don't build uart_dev_mvebu unless we're on arm64. 2017-09-09 20:14:18 +00:00
net Make LACP based lagg work with interfaces (like 100Gbps and 25Gbps) that 2017-09-06 14:36:35 +00:00
net80211 net80211: fix a typo (premable -> preamble). 2017-08-27 22:13:03 +00:00
netgraph Check return value from soaccept(). 2017-06-14 16:13:20 +00:00
netinet Fix MTU computation. Coverity scanning usrsctp pointed to this code... 2017-09-09 21:03:40 +00:00
netinet6 Fix a locking issue found by Coverity scanning the usrsctp library. 2017-09-09 20:51:54 +00:00
netipsec Fix possible double releasing for SA reference. 2017-09-01 11:51:07 +00:00
netpfil pf_get_sport(): Prevent possible endless loop when searching for an unused nat port 2017-08-08 21:09:26 +00:00
netsmb
nfs Improve FHA locality control for NFS read/write requests. 2017-07-31 15:23:19 +00:00
nfsclient
nfsserver
nlm Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ofed Remove unsafe access to the LinuxKPI file structure from ibcore. 2017-09-09 06:34:20 +00:00
opencrypto Use const with some read-only buffers in opencrypto APIs. 2017-05-09 18:28:42 +00:00
powerpc Fix riscv and powerpc compilation after r323329. 2017-09-09 05:56:04 +00:00
riscv Fix riscv and powerpc compilation after r323329. 2017-09-09 05:56:04 +00:00
rpc Listening sockets improvements. 2017-06-08 21:30:34 +00:00
security Sprinkle __read_frequently on few obvious places. 2017-09-06 20:33:33 +00:00
sparc64 Revert r323087 2017-09-01 17:03:48 +00:00
sys Move vmmeter atomic counters into dedicated cache lines 2017-09-10 19:00:38 +00:00
teken Fix syscons escape sequence for setting the local cursor type. This sequence 2017-08-18 15:40:40 +00:00
tests style(9): sort headers 2017-05-09 05:08:47 +00:00
tools make.conf: Add the possibility to use another DTC 2017-06-17 23:34:53 +00:00
ufs The new fsck recovery information to enable it to find backup 2017-09-04 20:19:36 +00:00
vm Move vmmeter atomic counters into dedicated cache lines 2017-09-10 19:00:38 +00:00
x86 Enhance qpi.c to make it usable on all Core-microarchitecture Xeons. 2017-09-08 19:51:03 +00:00
xdr * limit size of buffers to RPC_MAXDATASIZE 2017-06-01 06:12:25 +00:00
xen
Makefile Remove glimpse make target added in r181432 2017-05-22 15:53:30 +00:00