1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-22 15:47:37 +00:00
freebsd/sys
Konstantin Belousov 1bc93bb7b9 Currently, softupdate code detects overstepping on the workitems
limits in the code which is deep in the call stack, and owns several
critical system resources, like vnode locks.  Attempt to wait while
the per-mount softupdate thread cleans up the backlog may deadlock,
because the thread might need to lock the same vnode which is owned by
the waiting thread.

Instead of synchronously waiting for the worker, perform the worker'
tickle and pause until the backlog is cleaned, at the safe point
during return from kernel to usermode.  A new ast request to call
softdep_ast_cleanup() is created, the SU code now only checks the size
of queue and schedules ast.

There is no ast delivery for the kernel threads, so they are exempted
from the mechanism, except NFS daemon threads.  NFS server loop
explicitely checks for the request, and informs the schedule_cleanup()
that it is capable of handling the requests by the process P2_AST_SU
flag.  This is needed because nfsd may be the sole cause of the SU
workqueue overflow.  But, to not cause nsfd to spawn additional
threads just because we slow down existing workers, only tickle su
threads, without waiting for the backlog cleanup.

Reviewed by:	jhb, mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2015-05-27 09:20:42 +00:00
..
amd64 When I merged the lemul branch I missied kib@'s r282708 commit. 2015-05-25 20:44:46 +00:00
arm Remove unused mutex and softc variables. 2015-05-26 01:30:09 +00:00
arm64 ddb: finish converting boolean values. 2015-05-21 15:16:18 +00:00
boot Print error message if autoload fails due to missing DTB blob, otherwise 2015-05-26 20:32:14 +00:00
bsm
cam Handle EDQUOT backend storage errors same as ENOSPC. 2015-05-06 19:47:31 +00:00
cddl zfs: fixes for a full stream received into an existing dataset 2015-05-25 11:56:57 +00:00
compat When I merged the lemul branch I missied kib@'s r282708 commit. 2015-05-25 20:44:46 +00:00
conf MFi386: r283407 2015-05-26 14:08:32 +00:00
contrib Add support for the tuning cap for Hornet/AR9331 boards. 2015-05-23 08:02:54 +00:00
crypto In the version of gcc in the FreeBSD tree, this modification was made to 2015-04-16 17:42:52 +00:00
ddb ddb: de-register 2015-05-23 14:59:27 +00:00
dev sfxge: mask ifmedia options (pauses) when looking for matching mode 2015-05-27 08:57:48 +00:00
fs Currently, softupdate code detects overstepping on the workitems 2015-05-27 09:20:42 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
gnu The GNU Amlogic DTS files have some errors (e.g. bad register 2015-04-11 08:17:39 +00:00
i386 When I merged the lemul branch I missied kib@'s r282708 commit. 2015-05-25 20:44:46 +00:00
isa
kern Currently, softupdate code detects overstepping on the workitems 2015-05-27 09:20:42 +00:00
kgssapi
libkern Move zlib.c from net to libkern. 2015-04-22 14:38:58 +00:00
mips The kernel sends signals to the processes via ABI specific sv_sendsig method. 2015-05-24 17:56:02 +00:00
modules sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
net CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
net80211 Fix spelling mistake in comment. 2015-05-26 21:50:53 +00:00
netgraph CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
netinet CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
netinet6 CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
netipsec CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
netnatm
netpfil CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
netsmb
nfs Avoid closing unallocated socket in case socreate fails. 2015-02-28 20:30:29 +00:00
nfsclient Remove some oldnfs remnants. 2015-04-18 16:08:06 +00:00
nfsserver
nlm
ofed CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
opencrypto Use the correct number of arguments for the 2015-05-25 01:31:39 +00:00
pc98 Build GENERIC with RACCT/RCTL support by default. Note that it still 2015-05-14 14:03:55 +00:00
powerpc The kernel sends signals to the processes via ABI specific sv_sendsig method. 2015-05-24 17:56:02 +00:00
rpc Remove hard limits on number of accepting NFS connections. 2015-04-07 10:25:27 +00:00
security cred: add proc_set_cred helper 2015-03-16 00:10:03 +00:00
sparc64 The kernel sends signals to the processes via ABI specific sv_sendsig method. 2015-05-24 17:56:02 +00:00
sys Currently, softupdate code detects overstepping on the workitems 2015-05-27 09:20:42 +00:00
teken
tools
ufs Currently, softupdate code detects overstepping on the workitems 2015-05-27 09:20:42 +00:00
vm CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
x86 xen: make sure xenpv bus is the last to attach 2015-05-25 09:47:16 +00:00
xdr
xen xen: introduce a newbus function to allocate unused memory 2015-05-08 14:48:40 +00:00
Makefile