freebsd-skq/sys/fs
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
..
autofs Restore ABI compatibility, broken in r273127. Note that while this fixes 2015-02-10 16:17:16 +00:00
cd9660 Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using 2015-01-29 20:40:25 +00:00
cuse Don't use POLLNVAL as a return value from the client side poll 2015-01-13 13:32:18 +00:00
deadfs Style changes for deadfs: 2014-10-15 13:22:33 +00:00
devfs Refine r280308. Do not completely disable timestamping of devfs nodes 2015-04-01 08:25:40 +00:00
ext2fs Drop experimental dir_index support. 2015-04-17 22:26:01 +00:00
fdescfs Some fixes for fdescfs lookup code. 2015-02-28 19:57:22 +00:00
fifofs Make SIGSTOP working for sleeps done while waiting for fifo readers or 2015-01-18 15:03:26 +00:00
fuse File systems that do not use the buffer cache (such as ZFS) must 2015-04-15 20:16:31 +00:00
msdosfs File systems that do not use the buffer cache (such as ZFS) must 2015-04-15 20:16:31 +00:00
nandfs File systems that do not use the buffer cache (such as ZFS) must 2015-04-15 20:16:31 +00:00
nfs CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
nfsclient The NFS client generated directory block(s) with d_fileno == 0 2015-05-23 21:58:41 +00:00
nfsserver Currently, softupdate code detects overstepping on the workitems 2015-05-27 09:20:42 +00:00
nullfs File systems that do not use the buffer cache (such as ZFS) must 2015-04-15 20:16:31 +00:00
procfs Always set p_oppid when attaching to an existing process via procfs 2015-05-22 11:03:51 +00:00
pseudofs Hide vfs.pfs.trace variable if it is not used. 2015-05-24 18:11:22 +00:00
smbfs Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No 2015-01-30 22:02:32 +00:00
tmpfs tmpfs_getattr(): Return more correct allocated byte counts. 2015-04-10 19:04:39 +00:00
udf Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No 2015-01-30 22:01:45 +00:00
unionfs The VOP_LOOKUP() implementations for CREATE op do not put the name 2014-12-18 10:01:12 +00:00