Do not clip CPU count when CPU quota is used. (#26153) (#26806)
authorJan Kotas <jkotas@microsoft.com>
Mon, 23 Sep 2019 01:31:09 +0000 (18:31 -0700)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2019 01:31:09 +0000 (18:31 -0700)
src/classlibnative/bcltype/system.cpp
src/pal/src/thread/process.cpp
src/utilcode/util.cpp

index 1862114..402a215 100644 (file)
@@ -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;
index 1ce2cda..4f9d318 100644 (file)
@@ -2558,12 +2558,6 @@ PAL_GetCPUBusyTime(
         {
             return 0;
         }
-
-        UINT cpuLimit;
-        if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < dwNumberOfProcessors)
-        {
-            dwNumberOfProcessors = cpuLimit;
-        }
     }
 
     if (getrusage(RUSAGE_SELF, &resUsage) == -1)
index 8f62d53..e0f0200 100644 (file)
@@ -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;