freebsd-skq/sys
Jeff Roberson 98087a066f Make collapse synchronization more explicit and allow it to complete during
paging.

Shadow objects are marked with a COLLAPSING flag while they are collapsing with
their backing object.  This gives us an explicit test rather than overloading
paging-in-progress.  While split is on-going we mark an object with SPLIT.
These two operations will modify the swap tree so they must be serialized
and swap_pager_getpages() can now directly detect these conditions and page
more conservatively.

Callers to vm_object_collapse() now will reliably wait for a collapse to finish
so that the backing chain is as short as possible before other decisions are
made that may inflate the object chain.  For example, split, coalesce, etc.
It is now safe to run fault concurrently with collapse.  It is safe to increase
or decrease paging in progress with no lock so long as there is another valid
ref on increase.

This change makes collapse more reliable as a secondary benefit.  The primary
benefit is making it safe to drop the object lock much earlier in fault or
never acquire it at all.

This was tested with a new shadow chain test script that uncovered long
standing bugs and will be integrated with stress2.

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D22908
2020-01-19 18:30:23 +00:00
..
amd64 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
arm sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
arm64 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
bsm Jail and capability mode for shm_rename; add audit support for shm_rename 2019-11-18 13:31:16 +00:00
cam Const-poison the cam_sim_* convenience accessor functions. 2020-01-09 16:34:54 +00:00
cddl Map ECKSUM and EFRAGS from ZFS onto real errnos. 2020-01-13 22:06:16 +00:00
compat sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
conf sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
contrib MFV: r356607 2020-01-10 22:49:14 +00:00
crypto Fix the armv8 crypto driver after r354170. 2019-10-30 10:41:10 +00:00
ddb Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
dev dwmmc: Remove max_hz from the softc 2020-01-16 21:50:53 +00:00
dts arm64: allwinner: dtso: Add spi0 spigen DTSO 2020-01-11 18:36:10 +00:00
fs vfs: provide F_ISUNIONSTACK as a kludge for libc 2020-01-17 14:42:25 +00:00
gdb Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
geom GEOM label: strip leading/trailing space synthesizing devfs names 2020-01-18 03:33:44 +00:00
gnu Import DTS files for riscv from Linux 5.4 2019-12-03 09:12:53 +00:00
i386 sysent targets: further cleanup and deduplication 2020-01-18 20:37:45 +00:00
isa sc(4) md bits: stop setting sc->kbd entirely 2019-12-30 02:07:55 +00:00
kern Provide an API for interlocked refcount sleeps. 2020-01-19 18:18:17 +00:00
kgssapi Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
libkern random(9): Deprecate random(9), remove meaningless srandom(9) 2019-12-26 19:41:09 +00:00
mips Preserve the inherited value of the status register in cpu_set_upcall(). 2020-01-14 18:00:04 +00:00
modules [PowerPC64] Enable virtio drivers 2020-01-16 11:33:15 +00:00
net ifa_maintain_loopback_route: adjust debugging output 2020-01-18 04:48:05 +00:00
net80211 net80211: Move rate printing in amrr_node_stats() to a separate method 2020-01-17 22:04:11 +00:00
netgraph Generate MAC address from the FreeBSD OUI range. 2020-01-16 20:12:15 +00:00
netinet Remove debug code not needed anymore. 2020-01-16 17:15:06 +00:00
netinet6 Introduce NET_EPOCH_CALL() macro and use it everywhere where we free 2020-01-15 06:05:20 +00:00
netipsec Fix m_pullup() problem after removing PULLDOWN_TESTs and KAME EXT_*macros. 2019-12-01 00:22:04 +00:00
netpfil Introduce NET_EPOCH_CALL() macro and use it everywhere where we free 2020-01-15 06:05:20 +00:00
netsmb Stop using des_cblock * for arguments to DES functions. 2019-08-26 17:25:07 +00:00
nfs vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
nfsclient
nfsserver
nlm vfs: drop the mostly unused flags argument from VOP_UNLOCK 2020-01-03 22:29:58 +00:00
ofed Make sure the VNET is properly set when reaping mbufs in ipoib. 2020-01-11 12:02:16 +00:00
opencrypto Add stricter checking on mac key lengths. 2020-01-09 18:29:59 +00:00
powerpc D23057: [PowerPC] Fix offset calculations in bridge mode 2020-01-18 04:12:41 +00:00
riscv Check for invalid sstatus values in set_mcontext(). 2020-01-17 19:13:49 +00:00
rpc Change r355157 to make svc_rpc_gss_lifetime_max a static. 2019-11-28 02:18:51 +00:00
security vfs: eliminate v_tag from struct vnode 2020-01-07 04:29:34 +00:00
sparc64 Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
sys Provide an API for interlocked refcount sleeps. 2020-01-19 18:18:17 +00:00
teken Adjust teken to allow build as part of loader 2019-09-05 18:07:40 +00:00
tests
tools Add a 'SINGLETON' directive to kobj interface definition 2020-01-18 02:39:38 +00:00
ufs We only want to send the speedup to the lower layers when there's a shortage. 2020-01-17 01:16:23 +00:00
vm Make collapse synchronization more explicit and allow it to complete during 2020-01-19 18:30:23 +00:00
x86 Add KERNEL_PANICKED macro for use in place of direct panicstr tests 2020-01-12 06:07:54 +00:00
xdr
xen
Makefile