This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Use private futex operations for BlockingMutex
ClosedPublic

Authored by cryptoad on Aug 17 2018, 10:22 AM.

Details

Summary

Use FUTEX_PRIVATE_FLAG in conjunction with the wait & wake operations
employed by BlockingMutex. As far as I can tell, the mutexes are
process-private, and there is an actual performance benefit at employing the
private operations. There should be no downside to switching to it.

Diff Detail

Event Timeline

cryptoad created this revision.Aug 17 2018, 10:22 AM
Herald added subscribers: Restricted Project, delcypher, kubamracek. · View Herald TranscriptAug 17 2018, 10:22 AM
dvyukov accepted this revision.Aug 17 2018, 11:00 AM
This revision is now accepted and ready to land.Aug 17 2018, 11:00 AM

Have you noticed any difference in performance? I tried the same back in March I have not noticed any perf gain on the couple of benchmarks. I am merely curious, I think this is a right change to make anyways.

Have you noticed any difference in performance? I tried the same back in March I have not noticed any perf gain on the couple of benchmarks. I am merely curious, I think this is a right change to make anyways.

The performance gain is noticeable with the shared TSD model for Scudo, in some of the most contentious scenario.
With rpc2-benchmark (async mode, no client/server thread limitation, 72-core machines, TSD pool size of 32) the average QPS over 10 runs jumps from 347K to 375K.
In other cases, the gains are more marginal.

This revision was automatically updated to reflect the committed changes.