[ 
https://issues.apache.org/jira/browse/HBASE-15047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15074582#comment-15074582
 ] 

Elliott Clark commented on HBASE-15047:
---------------------------------------

bq.And usually I do not think a simple spin can perform better than standard 
locking method. 
http://askldjd.com/2010/05/16/spin-wait-vs-condition-variable/
http://stackoverflow.com/questions/5869825/when-should-one-use-a-spinlock-instead-of-mutex/5870415#5870415
http://www.alexonlinux.com/pthread-mutex-vs-pthread-spinlock

Spin locking is much faster than requesting the operating system to de-schedule 
and re-schedule a thread. 

> Try spin lock for MVCC completion
> ---------------------------------
>
>                 Key: HBASE-15047
>                 URL: https://issues.apache.org/jira/browse/HBASE-15047
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>         Attachments: HBASE-15047.patch
>
>
> Waits/Notify is very very expensive since it can cost a thread scheduling. 
> There should only ever be a few threads ( < Num Cores ) running. So it should 
> be possible to spin and use compare and swap to update the read point.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to