Add config var to allow disabling automatic CPU group assignment for threads (#38568)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Wed, 29 Jul 2020 18:50:59 +0000 (14:50 -0400)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2020 18:50:59 +0000 (11:50 -0700)
commitb262f0bd2e57c528241609aa47bc4eb99a865336
treea5ff042f14ea2b809bf469160fba4eb35fb358c7
parent564426051c8ec46051ee29048650cdae39c62d48
Add config var to allow disabling automatic CPU group assignment for threads (#38568)

- When CPU groups are enabled through config, some new threads (Thread.Start, thread pool threads) are automatically assigned to a CPU group, starting with the process' CPU group and once it is filled up, assigning new threads to a different CPU group. An app may have native components that also use threads, and may want to do its own thread-spreading (for instance in DllMain), this config allows such apps to disable the automatic CPU group assignment which would otherwise override an assignment made in DllMain. The new config var does not affect GC threads.
- This was requested for .NET Framework, porting to .NET Core as well
src/coreclr/src/inc/clrconfigvalues.h
src/coreclr/src/inc/utilcode.h
src/coreclr/src/utilcode/util.cpp
src/coreclr/src/vm/threads.cpp