On Wed, Sep 11, 2019 at 02:52:51PM +0800, Xiaoguang Wang wrote: > > I think maybe it might be better to use units of microseconds and then > > change sleep to usleep so the units are clear? This is a spinlock, so > > it should be quick. > > Sorry, I may not quite understand you, do you mean that milliseconds is not precise, so > should use microseconds? For these two patches, they do not use usleep or msleep to do > real sleep work, they just record the duration which process takes to wait bh_shadow flag > to be cleared or transaction to be unlocked. Apologies, I should have been clear enough. Yes, my concern that milliseconds might not be fine-grained enough. The sample results which you showed had values of 2ms, 1ms, and 0ms. And the single 0ms result in particular raised the concern that we should use a microseconds instead of milliseconds. In fact, instead of "sleep", maybe "latency(us)" or "latency(ms)" would be a better label? Regards, - Ted