[PATCH] D100348: [hwasan] Fix lock contention on thread creation.

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 15:01:54 PDT 2021


vitalybuka added inline comments.


================
Comment at: compiler-rt/lib/hwasan/hwasan_thread_list.h:92
       SpinMutexLock l(&list_mutex_);
       if (!free_list_.empty()) {
         t = free_list_.back();
----------------
eugenis wrote:
> vitalybuka wrote:
> > unrelated to the patch but maybe free_list_ and live_list_ could have each own mutex
> I've actually tried this and could not see a measurable perf improvement.
To my taste it would be cleaner that way: different resources rely on different mutexes.
This bug will less likely to happen in the first place :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100348/new/

https://reviews.llvm.org/D100348



More information about the llvm-commits mailing list