[PATCH] D115019: ThreadPool: grow the pool only as needed

Benoit Jacob via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 2 18:47:57 PST 2021


Benoit created this revision.
Herald added subscribers: Chia-hungDuan, dexonsmith, rriddle, hiraditya.
Benoit requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer.
Herald added a project: LLVM.

On my 96-core cloudtop 'machine', it seems unnecessary to always start
96 threads upfront... particularly as the ThreadPool is created even
with -mlir-disable-threading. Things like the resuling spew in GDB and
the obfuscated output of `(gdb) info threads` are my motivation here,
but it probably also doesn't hurt for at least some efficiency metrics to
avoid creating many threads upfront.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115019

Files:
  llvm/include/llvm/Support/ThreadPool.h
  llvm/lib/Support/ThreadPool.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115019.391525.patch
Type: text/x-patch
Size: 6010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211203/86d789d9/attachment.bin>


More information about the llvm-commits mailing list