Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/9760 )
Change subject: meta_cache: improve multi-threaded scalability ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/9760/1/src/kudu/client/meta_cache.h File src/kudu/client/meta_cache.h: http://gerrit.cloudera.org:8080/#/c/9760/1/src/kudu/client/meta_cache.h@261 PS1, Line 261: std::atomic<bool> stale_; Hmm, weren't you telling me in the past that std::atomic wasn't as performant as util/atomic? http://gerrit.cloudera.org:8080/#/c/9760/1/src/kudu/util/locks.h File src/kudu/util/locks.h: http://gerrit.cloudera.org:8080/#/c/9760/1/src/kudu/util/locks.h@142 PS1, Line 142: // Usage: : // percpu_rwlock mylock; : // : // // Lock shared: : // { : // boost::shared_lock<rw_spinlock> lock(mylock.get_lock()); : // ... : // } : // : // // Lock exclusive: : // : // { : // boost::lock_guard<percpu_rwlock> lock(mylock); : // ... : // } Mind updating this with the lock guards we actually use now? http://gerrit.cloudera.org:8080/#/c/9760/1/src/kudu/util/locks.h@239 PS1, Line 239: rw_spinlock lock; I'm curious why this uses a rw_spinlock under the hood and not a simple_spinlock? It seems like it could work either way; the usage is either "acquire all locks for writing" (exclusive) or "acquire my CPU's lock for reading" (shared). The class comment talks about mutexes without specifying what kind they are. -- To view, visit http://gerrit.cloudera.org:8080/9760 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I38c8a94ea177bfa4f4e2048355464f76a5daa2ba Gerrit-Change-Number: 9760 Gerrit-PatchSet: 1 Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Comment-Date: Fri, 23 Mar 2018 18:44:09 +0000 Gerrit-HasComments: Yes
