diff options
author | Vladimir Sadov <vsadov@microsoft.com> | 2020-01-14 19:31:01 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 19:31:01 -0800 |
commit | c43d0336eb999fe3bc7bf5873effe89cee716c69 (patch) | |
tree | 77fdd42e9c6da72035ee7773353e3f847bc92104 /src/pal | |
parent | 2f99ca8652bd31755aac431dc1bff8a4dda888eb (diff) | |
download | coreclr-c43d0336eb999fe3bc7bf5873effe89cee716c69.tar.gz coreclr-c43d0336eb999fe3bc7bf5873effe89cee716c69.tar.bz2 coreclr-c43d0336eb999fe3bc7bf5873effe89cee716c69.zip |
Revert CPU clipping in the presence of CPU quota to 3.0, 2.x behavior.
Basically reverting https://github.com/dotnet/coreclr/pull/26806
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/src/thread/process.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pal/src/thread/process.cpp b/src/pal/src/thread/process.cpp index 4f9d318bef..4b77f6327d 100644 --- a/src/pal/src/thread/process.cpp +++ b/src/pal/src/thread/process.cpp @@ -2558,6 +2558,12 @@ PAL_GetCPUBusyTime( { return 0; } + + UINT cpuLimit; + if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < dwNumberOfProcessors) + { + dwNumberOfProcessors = cpuLimit; + } } if (getrusage(RUSAGE_SELF, &resUsage) == -1) |