git: kernel - Rewrite the callout_*() API
Matthew Dillon
dillon at crater.dragonflybsd.org
Tue Mar 26 22:32:07 PDT 2019
commit eb67213abec698ffb555ee926f2761bcb7e95f55
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Mar 26 14:11:56 2019 -0700
kernel - Rewrite the callout_*() API
* Rewrite the entire API from scratch and improve compatibility
with FreeBSD. This is not an attempt to achieve full API compatibility,
as FreeBSD's API has unnecessary complexity that coders would frequently
make mistakes interpreting.
* Remove the IPI mechanisms in favor of fine-grained spin-locks instead.
* Add some robustness features in an attempt to track down corrupted
callwheel lists due to originating subsystems freeing structures out
from under an active callout.
* The code supports a full-blown type-stable/adhoc-reuse structural
separation between the front-end and the back-end, but this feature
is currently not operational and may be removed at some future point.
Instead we currently just embed the struct _callout inside the
struct callout.
* Replace callout_stop_sync() with callout_cancel().
* callout_drain() is now implemented as a synchronous cancel instead
of an asynchronous stop, which is closer to the FreeBSD API and
expected operation for ported code (usb stack in particular). We
will just have to fix any deadlocks which we come across.
* Retain our callout_terminate() function as the 'better' way to
stop using a callout, as it will not only cancel the callout but
also de-flag the structure so it can no longer be used.
Summary of changes:
share/man/man9/Makefile | 5 +-
share/man/man9/callout.9 | 537 +++++++--
sys/bus/u4b/usbdi.h | 2 +-
sys/dev/crypto/rdrand/rdrand.c | 2 +-
sys/dev/disk/ahci/ahci.c | 6 +-
sys/dev/disk/dm/delay/dm_target_delay.c | 2 +-
sys/dev/disk/mpt/mpt.h | 2 +-
sys/dev/disk/nata/ata-all.c | 2 +-
sys/dev/disk/nata/ata-lowlevel.c | 2 +-
sys/dev/disk/nata/ata-queue.c | 2 +-
sys/dev/disk/nata/chipsets/ata-ahci.c | 2 +-
sys/dev/disk/nata/chipsets/ata-marvell.c | 2 +-
sys/dev/disk/nata/chipsets/ata-siliconimage.c | 2 +-
sys/dev/disk/sili/sili.c | 4 +-
sys/dev/drm/include/linux/workqueue.h | 3 +-
sys/dev/drm/linux_hrtimer.c | 5 +-
sys/dev/misc/ecc/ecc_amd8000.c | 2 +-
sys/dev/misc/ecc/ecc_x3400.c | 2 +-
sys/dev/misc/ipmi/ipmi.c | 2 +-
sys/dev/misc/led/led.c | 2 +-
sys/dev/misc/psm/psm.c | 4 +-
sys/dev/netif/ath/ath/if_ath.c | 8 +-
sys/dev/netif/iwn/if_iwn.c | 6 +-
sys/dev/netif/oce/oce_if.c | 2 +-
sys/dev/raid/aac/aac.c | 2 +-
sys/dev/raid/ciss/ciss.c | 2 +-
sys/dev/raid/hptrr/hptrr_osm_bsd.c | 2 +-
sys/dev/raid/mfi/mfi.c | 2 +-
sys/dev/raid/mps/mps.c | 2 +-
sys/dev/raid/twa/tw_osl_freebsd.c | 4 +-
sys/dev/virtual/virtio/random/virtio_random.c | 2 +-
sys/dev/virtual/vmware/vmxnet3/if_vmx.c | 2 +-
sys/kern/kern_event.c | 12 +-
sys/kern/kern_exit.c | 2 +-
sys/kern/kern_synch.c | 2 +-
sys/kern/kern_time.c | 2 +-
sys/kern/kern_timeout.c | 1502 +++++++++++++++----------
sys/kern/kern_wdog.c | 11 +-
sys/kern/subr_log.c | 2 +-
sys/kern/subr_taskqueue.c | 3 +-
sys/net/altq/altq_rmclass.c | 3 +-
sys/net/ipfw/ip_fw2.c | 10 +-
sys/netinet/ip_carp.c | 6 +-
sys/netinet/tcp_subr.c | 10 +-
sys/netinet/tcp_timer2.h | 12 +
sys/netproto/802_11/README.DRAGONFLY | 2 +-
sys/netproto/802_11/wlan/ieee80211_dfs.c | 4 +-
sys/sys/callout.h | 252 ++---
48 files changed, 1512 insertions(+), 949 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/eb67213abec698ffb555ee926f2761bcb7e95f55
--
DragonFly BSD source repository
More information about the Commits
mailing list