Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 281a383

Browse files
authored
Do not clip CPU count when CPU quota is used. (#26153) (#26806)
1 parent 0fca828 commit 281a383

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

src/classlibnative/bcltype/system.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,6 @@ INT32 QCALLTYPE SystemNative::GetProcessorCount()
352352
processorCount = systemInfo.dwNumberOfProcessors;
353353
}
354354

355-
#ifdef FEATURE_PAL
356-
uint32_t cpuLimit;
357-
358-
if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < (uint32_t)processorCount)
359-
processorCount = cpuLimit;
360-
#endif
361-
362355
END_QCALL;
363356

364357
return processorCount;

src/pal/src/thread/process.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2558,12 +2558,6 @@ PAL_GetCPUBusyTime(
25582558
{
25592559
return 0;
25602560
}
2561-
2562-
UINT cpuLimit;
2563-
if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < dwNumberOfProcessors)
2564-
{
2565-
dwNumberOfProcessors = cpuLimit;
2566-
}
25672561
}
25682562

25692563
if (getrusage(RUSAGE_SELF, &resUsage) == -1)

src/utilcode/util.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,10 +1289,6 @@ int GetCurrentProcessCpuCount()
12891289

12901290
#else // !FEATURE_PAL
12911291
count = PAL_GetLogicalCpuCountFromOS();
1292-
1293-
uint32_t cpuLimit;
1294-
if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < count)
1295-
count = cpuLimit;
12961292
#endif // !FEATURE_PAL
12971293

12981294
cCPUs = count;

0 commit comments

Comments
 (0)