Also update the UMA manual page to mention its SMR-enabled
functionality. Details of its usage are provided in the SMR manual
page.
Sponsored by: The FreeBSD Foundation
Differential D38108
man9: Add an smr(9) manual page markj on Jan 17 2023, 9:36 PM. Authored by Tags None Referenced Files
Details
Also update the UMA manual page to mention its SMR-enabled Sponsored by: The FreeBSD Foundation
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions To ease things, I've uploaded a new diff for the whole review that includes proposed changes: .Comment Actions Thank you very much for the feedback and patch. I incorporated all of it except the "concurrent" -> "concurrently" changes, where I rewrote the sentences instead.
Comment Actions Thanks. I have two further nitpicks. Otherwise, LGTM.
Comment Actions I think it would be quite useful to add a short introductory paragraph to locking(9) that describes SMR, and a pointer back to this new page. Obviously, this is a follow-up. Ideally all synchronization primitives should get a high-level description in locking(9), whether they are lockless or not. Notably, we are missing epoch(9). Comment Actions I added such a paragraph. epoch and SMR are morally quite similar (long-term they should really be unified) so I mentioned both. I didn't update the interactions table though since that gets rather complicated... Comment Actions I think a note along the following lines is useful or even needed. SMR does not provide safety for readers alone, and users of SMR must use some lock-less algorithm for accessing and modifying the data structure. SMR only provides a variant of the helper to implement safe memory reclamations, for lock-less algorithms.
Comment Actions Yes, I agree. In fact there is more to write about this topic, I did not mention the macros in smr_types.h. At some point those macros should be documented, but I think they aren't used widely enough yet and might be subject to change. So I postponed it for now.
Comment Actions Do we want to proclaim a memory model semantic for smr* functions? For instance, the current implementation of smr_enter() has full seq cst semantic, while smr_exit()/smr_lazy_exit() has release. On the other hand, smr_lazy_enter() seems to be relaxed. Do we allow consumers to rely on that, on require user code to handle ordering on its own? Comment Actions I think it would be useful to note that smr_enter()/exit() have acquire and release semantics, respectively. The fact that smr_enter() has stronger semantics is an implementation detail that shouldn't be relied upon, I believe. I didn't document smr_lazy_enter() yet, so won't mention it for now. Comment Actions LGTM from manpages Three small suggestions for locking.9, but these are more than optional. Thanks for the work on this manual page.
Comment Actions
|