diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2019-02-26 14:24:22 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2019-02-26 14:24:22 +0000 |
commit | 8c7f578cb27e63d93d0469407f24a5c538a38605 (patch) | |
tree | a27980560b7dc8fe0af18c16bc283b3f486b3b51 /sys/conf | |
parent | a6a6c0baf8380d18184846e4b72d48148614a92e (diff) |
Introduce safe memory reclamation, a mechanism for reclaiming shared
objects that readers can access without locking. This provides a basis
for read-copy-update operations.
Readers access SMR-protected shared objects inside SMR read-side
critical section where sleeping is not allowed. To reclaim
an SMR-protected object, the writer has to ensure mutual exclusion of
other writers, remove the object's shared reference and wait until
read-side references cannot exist any longer. As an alternative to
waiting, the writer can schedule a callback that gets invoked when
reclamation is safe.
The mechanism relies on CPU quiescent states to determine when an
SMR-protected object is ready for reclamation.
The <sys/smr.h> header additionally provides an implementation of
singly- and doubly-linked lists that can be used together with SMR.
These lists allow lockless read access with a concurrent writer.
Discussed with many
OK mpi@ sashan@
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/files | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/conf/files b/sys/conf/files index d17bd431133..338fa41cbe2 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,4 +1,4 @@ -# $OpenBSD: files,v 1.666 2018/12/20 23:00:55 dlg Exp $ +# $OpenBSD: files,v 1.667 2019/02/26 14:24:21 visa Exp $ # $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 @@ -691,6 +691,7 @@ file kern/kern_unveil.c file kern/kern_sched.c file kern/kern_sensors.c file kern/kern_sig.c +file kern/kern_smr.c file kern/kern_subr.c file kern/kern_sysctl.c file kern/kern_synch.c |