Messages in this thread | | | Date | Thu, 11 Mar 2010 17:43:44 +0800 | From | Xiao Guangrong <> | Subject | lock's trace events can improve mutex's performance in userspace? |
| |
We found that if enable lock's trace events, the 'sysbench mutex' benchmark program can run quicker.
The simple program that is attached can reproduce it, the system info, kernel config, and the script are also attached.
The test step is below:
# tar -zxvf test-mutex.tar.bz # cd test-mutex # make # ./tscript.sh >& log # cat log | grep "real" real 0m46.765s < all trace events are disabled > real 0m47.073s real 0m47.402s real 0m46.458s real 0m47.433s real 0m47.395s real 0m47.010s real 0m47.454s real 0m47.044s real 0m47.464s real 0m39.245s < enable lock's trace events > real 0m40.822s real 0m40.779s real 0m40.549s real 0m40.605s real 0m40.923s real 0m40.560s real 0m41.050s real 0m40.757s real 0m40.715s
[ "< ... >" is my comments ]
From the result, we can see the program's runtime is less if enable lock's trace events.
The conclusion is weird but i don't know why. [unhandled content-type:application/octet-stream] | |