aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/_smr.h
Commit message (Collapse)AuthorAgeFilesLines
* Move SMR pointer type definition and access macros to smr_types.h.Mark Johnston2020-03-071-0/+12
| | | | | | | | | | | | | | | | | | | | | The intent is to provide a header that can be included by other headers without introducing too much pollution. smr.h depends on various headers and will likely grow over time, but is less likely to be required by system headers. Rename SMR_TYPE_DECLARE() to SMR_POINTER(): - One might use SMR to protect more than just pointers; it could be used for resizeable arrays, for example, so TYPE seems too generic. - It is useful to be able to define anonymous SMR-protected pointer types and the _DECLARE suffix makes that look wrong. Reviewed by: jeff, mjg, rlibby Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23988 Notes: svn path=/head/; revision=358728
* Add an atomic-free tick moderated lazy update variant of SMR.Jeff Roberson2020-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | 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: svn path=/head/; revision=358236
* Don't use "All rights reserved" in new copyrights.Jeff Roberson2020-01-311-2/+1
| | | | | | | Requested by: rgrimes Notes: svn path=/head/; revision=357316
* Implement a safe memory reclamation feature that is tightly coupled with UMA.Jeff Roberson2020-01-311-0/+38
This is in the same family of algorithms as Epoch/QSBR/RCU/PARSEC but is a unique algorithm. This has 3x the performance of epoch in a write heavy workload with less than half of the read side cost. The memory overhead is significantly lessened by limiting the free-to-use latency. A synthetic test uses 1/20th of the memory vs Epoch. There is significant further discussion in the comments and code review. This code should be considered experimental. I will write a man page after it has settled. After further validation the VM will begin using this feature to permit lockless page lookups. Both markj and cperciva tested on arm64 at large core counts to verify fences on weaker ordering architectures. I will commit a stress testing tool in a follow-up. Reviewed by: mmacy, markj, rlibby, hselasky Discussed with: sbahara Differential Revision: https://reviews.freebsd.org/D22586 Notes: svn path=/head/; revision=357314