From 281a383d913e7b6013068ec430fc21cf81f43350 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Sun, 22 Sep 2019 18:31:09 -0700 Subject: Do not clip CPU count when CPU quota is used. (#26153) (#26806) --- src/classlibnative/bcltype/system.cpp | 7 ------- src/pal/src/thread/process.cpp | 6 ------ src/utilcode/util.cpp | 4 ---- 3 files changed, 17 deletions(-) diff --git a/src/classlibnative/bcltype/system.cpp b/src/classlibnative/bcltype/system.cpp index 18621145cf..402a215e9f 100644 --- a/src/classlibnative/bcltype/system.cpp +++ b/src/classlibnative/bcltype/system.cpp @@ -352,13 +352,6 @@ INT32 QCALLTYPE SystemNative::GetProcessorCount() processorCount = systemInfo.dwNumberOfProcessors; } -#ifdef FEATURE_PAL - uint32_t cpuLimit; - - if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < (uint32_t)processorCount) - processorCount = cpuLimit; -#endif - END_QCALL; return processorCount; diff --git a/src/pal/src/thread/process.cpp b/src/pal/src/thread/process.cpp index 1ce2cda59f..4f9d318bef 100644 --- a/src/pal/src/thread/process.cpp +++ b/src/pal/src/thread/process.cpp @@ -2558,12 +2558,6 @@ PAL_GetCPUBusyTime( { return 0; } - - UINT cpuLimit; - if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < dwNumberOfProcessors) - { - dwNumberOfProcessors = cpuLimit; - } } if (getrusage(RUSAGE_SELF, &resUsage) == -1) diff --git a/src/utilcode/util.cpp b/src/utilcode/util.cpp index 8f62d53f95..e0f0200076 100644 --- a/src/utilcode/util.cpp +++ b/src/utilcode/util.cpp @@ -1289,10 +1289,6 @@ int GetCurrentProcessCpuCount() #else // !FEATURE_PAL count = PAL_GetLogicalCpuCountFromOS(); - - uint32_t cpuLimit; - if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < count) - count = cpuLimit; #endif // !FEATURE_PAL cCPUs = count; -- cgit v1.2.3