freebsd-nq/sys
Konstantin Belousov 2d19b736ed Rewrite subr_sleepqueue.c use of callouts to not depend on the
specifics of callout KPI.  Esp., do not depend on the exact interface
of callout_stop(9) return values.

The main change is that instead of requiring precise callouts, code
maintains absolute time to wake up.  Callouts now should ensure that a
wake occurs at the requested moment, but we can tolerate both run-away
callout, and callout_stop(9) lying about running callout either way.

As consequence, it removes the constant source of the bugs where
sleepq_check_timeout() causes uninterruptible thread state where the
thread is detached from CPU, see e.g. r234952 and r296320.

Patch also removes dual meaning of the TDF_TIMEOUT flag, making code
(IMO much) simpler to reason about.

Tested by:	pho
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Differential revision:	https://reviews.freebsd.org/D7137
2016-07-28 09:09:55 +00:00
..
amd64 Add more UEFI/e820 memory types from latest specifications. 2016-07-24 09:15:11 +00:00
arm Enable the build of micphy as part of generic miibus build, but only for 2016-07-28 05:59:56 +00:00
arm64 Remove an unused variable. 2016-07-25 16:18:20 +00:00
boot Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console. 2016-07-19 19:00:22 +00:00
bsm
cam Remove some extraneous printfs. 2016-07-25 19:16:30 +00:00
cddl Merge {amd64,i386}/instr_size.c into x86_instr_size.c. 2016-07-20 00:02:10 +00:00
compat Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
conf Enable the build of micphy as part of generic miibus build, but only for 2016-07-28 05:59:56 +00:00
contrib Update iwmfw(4) to include support for 8260 series units and update 2016-07-25 23:05:25 +00:00
crypto
ddb Rewrite subr_sleepqueue.c use of callouts to not depend on the 2016-07-28 09:09:55 +00:00
dev hyperv/vmbus: Inclusion cleanup 2016-07-28 06:46:10 +00:00
fs Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
gdb
geom Do not invoke resize method if geom is being withered. 2016-07-25 09:12:08 +00:00
gnu
i386 Add more UEFI/e820 memory types from latest specifications. 2016-07-24 09:15:11 +00:00
isa
kern Rewrite subr_sleepqueue.c use of callouts to not depend on the 2016-07-28 09:09:55 +00:00
kgssapi
libkern
mips
modules opt_bdg.h was removed in r150636. 2016-07-27 20:48:15 +00:00
net Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
net80211
netgraph
netinet Prepare for network stack as a module 2016-07-27 20:34:09 +00:00
netinet6 Prepare for network stack as a module 2016-07-27 20:34:09 +00:00
netipsec Get closer to a VIMAGE network stack teardown from top to bottom rather 2016-06-21 13:48:49 +00:00
netnatm
netpfil Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
netsmb
nfs Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
nfsclient
nfsserver
nlm
ofed
opencrypto
pc98
powerpc Use label math instead of hard-coding offsets for return addresses. 2016-07-23 02:27:42 +00:00
riscv
rpc Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
security
sparc64
sys Rewrite subr_sleepqueue.c use of callouts to not depend on the 2016-07-28 09:09:55 +00:00
teken
tests
tools
ufs Ensure that the UFS directory vnode' vm_object is properly sized 2016-07-20 14:40:56 +00:00
vm De-pluralize "queues" where appropriate in the pagedaemon code. 2016-07-27 17:11:03 +00:00
x86
xdr
xen
Makefile