]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/common/tri_mutex: improve comments
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 15 Apr 2024 02:02:48 +0000 (10:02 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 19 Apr 2024 03:37:23 +0000 (11:37 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/common/tri_mutex.h

index 369a8802cf067bf9dc56369d9f133c4b3264b4d7..a75895fa8decc48415996e0df4c869b6a674f06f 100644 (file)
@@ -47,11 +47,11 @@ public:
 
 /// shared/exclusive mutual exclusion
 ///
-/// this lock design uses reader and writer is entirely and completely
-/// independent of the conventional reader/writer lock usage. Here, what we
-/// mean is that we can pipeline reads, and we can pipeline writes, but we
-/// cannot allow a read while writes are in progress or a write while reads are
-/// in progress. Any rmw operation is therefore exclusive.
+/// Unlike reader/write lock, tri_mutex does not enforce the exclusive access
+/// of write operations, on the contrary, multiple write operations are allowed
+/// to hold the same tri_mutex at the same time. Here, what we mean is that we
+/// can pipeline reads, and we can pipeline writes, but we cannot allow a read
+/// while writes are in progress or a write while reads are in progress.
 ///
 /// tri_mutex is based on seastar::shared_mutex, but instead of two kinds of
 /// waiters, tri_mutex keeps track of three kinds of lock users: