Tencent / paxosstore

PaxosStore has been deployed in WeChat production for more than two years, providing storage services for the core businesses of WeChat backend. Now PaxosStore is running on thousands of machines, and is able to afford billions of peak TPS.
Other
1.67k stars 336 forks source link

rdtscp这个指令有问题 #4

Closed crestxu closed 7 years ago

crestxu commented 7 years ago

https://github.com/Tencent/paxosstore/blob/d83137bd667e84b568ae96e06ea0b52f4c8372d2/certain/utils/FooHook.h#L12

应该替换成 struct timeval now = { 0 }; gettimeofday( &now,NULL ); unsigned long long u = now.tv_sec; u *= 1000; u += now.tv_usec / 1000; return u;

dengoswei commented 7 years ago

crest总好. 问题是 ? 内部旧代码一直在不严格的场景用RDTSCP, 精确的用gettimeofday..

crestxu commented 7 years ago

我的机器上没有这个指令,哈哈哈

dengoswei commented 7 years ago

参照libco, 默认不用RDTSCP.. 最新代码.