git: kernel - Implement new callout*() core
Matthew Dillon
dillon at crater.dragonflybsd.org
Tue Nov 25 10:22:17 PST 2014
commit d0f829f6fc7b1c33c7790ed3d68343f1153d9d31
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Tue Nov 25 10:15:42 2014 -0800
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.
Summary of changes:
sys/kern/kern_timeout.c | 822 +++++++++++++++++++++++++++++++++------------
sys/netinet/sctp_callout.h | 2 +
sys/sys/callout.h | 128 ++++++-
3 files changed, 716 insertions(+), 236 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d0f829f6fc7b1c33c7790ed3d68343f1153d9d31
--
DragonFly BSD source repository
More information about the Commits
mailing list