[all-commits] [llvm/llvm-project] acbb4f: tsan: increase max number of threads supported by ...

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Wed Jul 28 08:35:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: acbb4fcd5e664ddfb515785f1839afc8f2570035
      https://github.com/llvm/llvm-project/commit/acbb4fcd5e664ddfb515785f1839afc8f2570035
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

  Log Message:
  -----------
  tsan: increase max number of threads supported by test-only barrier

Currently the barrier supports only 256 threads,
this does not allow to write reliable tests that use more threads.
Bump max number of threads to 1024 to support writing
good stress tests.
Also replace sched_yield() with usleep(100) on the wait path.
If we write tests that create hundreds of threads (and dozens
of tests can run in parallel), yield would consume massive
amounts of CPU time for spinning.

Depends on D106952.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D106953




More information about the All-commits mailing list