libthread_xu - Improve contended mutex code
commitf56151fa43e3b9a933b2c10ac2bbab0421823e12
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 23 Apr 2018 02:29:58 +0000 (22 19:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 23 Apr 2018 02:31:28 +0000 (22 19:31 -0700)
tree3b37cc0091ea558f39877998005f29313aa4f67c
parent024f2ea16950750d30b44d25b65ea1d88634b807
libthread_xu - Improve contended mutex code

* Retry a few times in a loop before using the umtx*() system
  calls to sleep.

  This significantly reduces IPI traffic and improves performance
  when a mutex is heavily contended.
lib/libthread_xu/thread/thr_umtx.c
lib/libthread_xu/thread/thr_umtx.h