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

Improve detection of CPU limits when running inside a Container #23413

Merged
merged 1 commit into from
Mar 25, 2019

Conversation

luhenry
Copy link

@luhenry luhenry commented Mar 22, 2019

This focuses on better supporting --cpuset-cpus which limits the number of processors we have access to on the CPU; it also specifies which specific processor we have access to, but that’s irrelevant here

The work has been done here for all runtime components except Environment.ProcessorCount. The work consist in fixing PAL_GetLogicalCpuCountFromOS to use sched_getaffinity.

Fixes https://github.com/dotnet/coreclr/issues/22302

This focuse on better supporting `--cpuset-cpus` which limits the number of processors we have access to on the CPU; it also specifies which specific processor we have access to, but that’s irrelevant here

The work has been done here for all runtime components except `Environment.ProcessorCount`. The work consist in fixing `PAL_GetLogicalCpuCountFromOS` to use `sched_getaffinity`.

Fixes https://github.com/dotnet/coreclr/issues/22302
@luhenry luhenry requested a review from janvorli March 22, 2019 20:11
@luhenry
Copy link
Author

luhenry commented Mar 22, 2019

/cc @sergiy-k

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@janvorli janvorli merged commit e6c49f7 into dotnet:master Mar 25, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Improve detection of CPU limits when running inside a Container

Commit migrated from dotnet/coreclr@e6c49f7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve detection of CPU limits when running inside container
2 participants