Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SR-12833: processInfo.activeProcessorCount ignores CFS quotas #2931

Merged
merged 1 commit into from Dec 12, 2020

Conversation

spevans
Copy link
Collaborator

@spevans spevans commented Nov 29, 2020

Tested on a docker instance:

$ docker run -it --rm --privileged --cpus=1 swift-main-test /main-test/usr/bin/swift
Welcome to Swift version 5.3-dev (LLVM d6fb8423828a5e4, Swift 638d5e7be2d38c7).
Type :help for assistance.
  1>  import Foundation; ProcessInfo.processInfo.activeProcessorCount
$R0: Int = 1

$ docker run -it --rm --privileged --cpus=2 swift-main-test /main-test/usr/bin/swift
Welcome to Swift version 5.3-dev (LLVM d6fb8423828a5e4, Swift 638d5e7be2d38c7).
Type :help for assistance.
  1>  import Foundation; ProcessInfo.processInfo.activeProcessorCount
$R0: Int = 2
  
$ docker run -it --rm --privileged --cpus=5 swift-main-test /main-test/usr/bin/swift
Welcome to Swift version 5.3-dev (LLVM d6fb8423828a5e4, Swift 638d5e7be2d38c7).
Type :help for assistance.
  1>  import Foundation; ProcessInfo.processInfo.activeProcessorCount
$R0: Int = 5

@spevans
Copy link
Collaborator Author

spevans commented Nov 29, 2020

@swift-ci test

@spevans
Copy link
Collaborator Author

spevans commented Nov 30, 2020

@swift-ci test linux

@spevans
Copy link
Collaborator Author

spevans commented Dec 7, 2020

@swift-ci test

@spevans
Copy link
Collaborator Author

spevans commented Dec 7, 2020

@swift-ci test linux

@spevans
Copy link
Collaborator Author

spevans commented Dec 11, 2020

@swift-ci test

@spevans
Copy link
Collaborator Author

spevans commented Dec 11, 2020

@swift-ci test linux

2 similar comments
@spevans
Copy link
Collaborator Author

spevans commented Dec 11, 2020

@swift-ci test linux

@spevans
Copy link
Collaborator Author

spevans commented Dec 12, 2020

@swift-ci test linux

- For Linux, take into account CFS quotes eg, if running under Docker.
@spevans
Copy link
Collaborator Author

spevans commented Dec 12, 2020

@swift-ci test and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants