Expose ThreadPool_UnfairSemaphoreSpinLimit config
authorLukasz Tomczyk <lutom@microsoft.com>
Mon, 18 Jul 2016 16:28:12 +0000 (09:28 -0700)
committerLukasz Tomczyk <lutom@microsoft.com>
Tue, 2 Aug 2016 23:14:43 +0000 (16:14 -0700)
commit581bfc9b8c9b2c1cbb80b65e035d9865cbb3b2f1
tree8a3b8a302cc8f5eec5bdc8d923bff9b2107fce83
parent61476512cd0473068bf0101c7f53d2ff88ca15b9
Expose ThreadPool_UnfairSemaphoreSpinLimit config

Spin-wait in ThreadpoolMgr::UnfairSemaphore::Wait can cause significant
CPU usage, which is unnecessary in some scenarios, where threadpool
receives work in bursts. Use of the above parameter will allow fine tuning
of the threadpool behavior based on the workload expectation.

Fix dotnet/coreclr#5928

Commit migrated from https://github.com/dotnet/coreclr/commit/0504bf7c2d8003e81b0c5ad6392831f36781470a
src/coreclr/src/inc/clrconfigvalues.h
src/coreclr/src/vm/win32threadpool.cpp
src/coreclr/src/vm/win32threadpool.h