kernel - Implement new callout*() core
commitd0f829f6fc7b1c33c7790ed3d68343f1153d9d31
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 25 Nov 2014 18:15:42 +0000 (25 10:15 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 25 Nov 2014 18:15:42 +0000 (25 10:15 -0800)
tree8a816fcb699bc12bae2a4db36abcdbe0ec10fcef
parentfd2d5a042dea3529e1bbeadfff30284975bebadb
kernel - Implement new callout*() core

* Rewrite the callout*() function core to run more efficiently.
  This has a much better mechanism for locking a callout to a
  cpu and for dealing with synchronous waits for callbacks to
  complete.

  The IPI busy/wait loop has been removed for remote-cpu operations.
  The code now blocks normally and callers will have to understand that.
  This will make it a lot easier to debug races.

* Add callout_init_lk() which implements auto-locking similar
  to FreeBSD.  Several FreeBSD mechanisms already depend on it
  and it will make porting easier.  And it works pretty well.

* Preparation for a more synchronous interface.

* Note that the new API is roughly similar to the old
  except callout_reset() now issues a synchronous stop
  instead of an asynchronous stop.  Soon we will also
  switch around the function names to make MP operation
  and synchronous operation the default across the
  board.
sys/kern/kern_timeout.c
sys/netinet/sctp_callout.h
sys/sys/callout.h