Todd Lipcon has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/9760 )

Change subject: meta_cache: improve multi-threaded scalability
......................................................................


Patch Set 1:

(2 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 performa
On older compilers I think there were some issues with optimizations or 
something -- the issue I remember citing was when Chromium converted SpinLock 
to std::atomic it caused a regression so they backed it out. We probably should 
re-evaluate on our current generation of compilers. But either way I think this 
is a big improvement from spinlock-protected bool.


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@239
PS1, Line 239:     rw_spinlock lock;
> I'm curious why this uses a rw_spinlock under the hood and not a simple_spi
Cuz a node can get pre-empted off its CPU while it holds the lock, it's handy 
that it's a reader-writer lock so the next thread on that same CPU can still 
acquire that slot.



--
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-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Comment-Date: Fri, 23 Mar 2018 18:52:46 +0000
Gerrit-HasComments: Yes

Reply via email to