1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/sys
Alexander Motin 2e9ccb32a1 Make ZFS ARC track both KVA usage and fragmentation.
Even on Illumos, with its much larger KVA, ZFS ARC steps back if KVA usage
reaches certain threshold (3/4 on i386 or 16/17 otherwise).  FreeBSD has
even less KVA, but had no such limit on archs with direct map as amd64.
As result, on machines with a lot of RAM, during load with very small user-
space memory pressure, such as `zfs send`, it was possible to reach state,
when there is enough both physical RAM and KVA (I've seen up to 25-30%),
but no continuous KVA range to allocate even single 128KB I/O request.

Address this situation from two sides:
 - restore KVA usage limitations in a way the most close to Illumos;
 - introduce new requirement for KVA fragmentation, specifying that we
should have at least one sequential KVA range of zfs_max_recordsize bytes.

Experiments show that first limitation done alone is not sufficient.  On
machine with 64GB of RAM it is sometimes needed to drop up to half of ARC
size to get at leats one 1MB KVA chunk.  Statically limiting ARC to half
of KVA/RAM is too strict, so second limitation makes it to work in cycles:
accumulate trash up to certain critical mass, do massive spring-cleaning,
and then start littering again. :)

MFC after:	1 month
2015-04-03 14:45:48 +00:00
..
amd64 Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
arm Merge the common parts of the SOCKIT and SOCKIT-BERI kerenel, and mark the 2015-04-03 11:12:59 +00:00
arm64/include Add space for future expansion [1]. While here clean up a little, spsr is 2015-04-03 10:56:42 +00:00
boot Only enable the efi framebuffer on x86 for now 2015-04-03 12:54:38 +00:00
bsm
cam Add some additional quirks for various Western Digital Caviar MHDDs 2015-03-30 09:05:20 +00:00
cddl Make ZFS ARC track both KVA usage and fragmentation. 2015-04-03 14:45:48 +00:00
compat Remove unused code. 2015-04-02 10:19:24 +00:00
conf Add necessary changes to support various Amlogic SoC devices 2015-03-31 11:50:46 +00:00
contrib o Use new function ip_fillid() in all places throughout the kernel, 2015-04-01 22:26:39 +00:00
crypto
ddb
dev o Remove superfluous includes 2015-04-03 11:37:23 +00:00
fs Refine r280308. Do not completely disable timestamping of devfs nodes 2015-04-01 08:25:40 +00:00
gdb
geom Remove extra semicolon. 2015-03-27 12:45:20 +00:00
gnu File names with commas in them cause issues for freebsd-update. We 2015-03-12 06:43:58 +00:00
i386 Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
isa
kern Make ZFS ARC track both KVA usage and fragmentation. 2015-04-03 14:45:48 +00:00
kgssapi
libkern Implement asprintf in libkern 2015-03-01 00:22:16 +00:00
mips Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
modules sym and cxgb build on arm, add them to the build. 2015-03-27 02:35:33 +00:00
net Fix a possible mbuf leak on interface departure. 2015-03-26 23:40:22 +00:00
net80211 Initialise the pps / packet tracking timestamp so 11n aggregation works again. 2015-03-22 17:54:00 +00:00
netgraph Change the callout to supply -1 to indicate we are not changing 2015-03-28 12:50:24 +00:00
netinet Extend fixes made in r278103 and r38754 by copying the complete packet 2015-04-02 15:47:37 +00:00
netinet6 Preserve IPv6 fragment IDs accross reassembly and refragmentation 2015-04-01 12:15:01 +00:00
netipsec o Use new function ip_fillid() in all places throughout the kernel, 2015-04-01 22:26:39 +00:00
netnatm
netpfil o Use new function ip_fillid() in all places throughout the kernel, 2015-04-01 22:26:39 +00:00
netsmb
nfs Avoid closing unallocated socket in case socreate fails. 2015-02-28 20:30:29 +00:00
nfsclient
nfsserver
nlm
ofed Fix variable casting: 2015-03-27 19:08:11 +00:00
opencrypto
pc98
powerpc Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
rpc Fix overflow bugs in and remove obsolete limit from kernel RPC 2015-04-01 00:45:47 +00:00
security cred: add proc_set_cred helper 2015-03-16 00:10:03 +00:00
sparc64 Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
sys Make ZFS ARC track both KVA usage and fragmentation. 2015-04-03 14:45:48 +00:00
teken
tools
ufs Fix build (with gcc). 2015-03-27 15:49:21 +00:00
vm Fix integer truncation bug in malloc(9) 2015-04-01 12:42:26 +00:00
x86 When mapping an allocated entry, use the entry size, instead of the 2015-03-24 12:48:51 +00:00
xdr
xen Use SYSCTL_OUT_STR() to return strings. 2015-03-14 21:40:24 +00:00
Makefile