aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_smr.h
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2020-02-22 03:44:10 +0000
committerJeff Roberson <jeff@FreeBSD.org>2020-02-22 03:44:10 +0000
commit226dd6db470570bcba4db850760d485921d55fc3 (patch)
tree9ff79bd40bdba43edc0d0d0521198fe051605b6e /sys/sys/_smr.h
parentb63d2d683ddbbfc066fb4653b2e37e6c58875d6d (diff)
downloadsrc-226dd6db470570bcba4db850760d485921d55fc3.tar.gz
src-226dd6db470570bcba4db850760d485921d55fc3.zip
Add an atomic-free tick moderated lazy update variant of SMR.
This enables very cheap read sections with free-to-use latencies and memory overhead similar to epoch. On a recent AMD platform a read section cost 1ns vs 5ns for the default SMR. On Xeon the numbers should be more like 1 ns vs 11. The memory consumption should be proportional to the product of the free rate and 2*1/hz while normal SMR consumption is proportional to the product of free rate and maximum read section time. While here refactor the code to make future additions more straightforward. Name the overall technique Global Unbound Sequences (GUS) and adjust some comments accordingly. This helps distinguish discussions of the general technique (SMR) vs this specific implementation (GUS). Discussed with: rlibby, markj
Notes
Notes: svn path=/head/; revision=358236
Diffstat (limited to 'sys/sys/_smr.h')
-rw-r--r--sys/sys/_smr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/_smr.h b/sys/sys/_smr.h
index 71658aa65e01..834d912783f5 100644
--- a/sys/sys/_smr.h
+++ b/sys/sys/_smr.h
@@ -32,6 +32,7 @@
#define _SYS__SMR_H_
typedef uint32_t smr_seq_t;
+typedef int32_t smr_delta_t;
typedef struct smr *smr_t;
#endif /* __SYS_SMR_H_ */