-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
More flexible test affinity setting #44677
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direction LGTM. I think we want to dedup get_cpumask
.
b104342
to
7e1c253
Compare
7e1c253
to
8759728
Compare
When running on a machine with `cpusets` applied, we are unable to assign CPU affinity to CPUs 1 and 2; we may be locked to CPUs 9-16, for example. So we must inspect what our current cpumask is, and from that select CPUs that we can safely assign affinity to in our tests.
2a58cdf
to
c430269
Compare
@staticfloat @tkf Any idea why the tests are failing? |
I think it fails on macos because libuv does not support affinity on macos (so it makes sense). linux32 fails with OOM so maybe it's an accident? The failure on win32 looks like a bug? (https://build.julialang.org/#/builders/42/builds/3572/steps/5/logs/stdio)
|
The |
What's the best way to deal with macOS? |
I just pushed my shot at it (3b666df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good to go once CI is happy
@@ -96,9 +98,10 @@ end | |||
const AFFINITY_SUPPORTED = (Sys.islinux() || Sys.iswindows()) && !running_under_rr() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can potentially drop the rr check, since it will be implied (it sets an affinity mask to 1 cpu)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see how it goes: #44693
* More flexibly test affinity setting When running on a machine with `cpusets` applied, we are unable to assign CPU affinity to CPUs 1 and 2; we may be locked to CPUs 9-16, for example. So we must inspect what our current cpumask is, and from that select CPUs that we can safely assign affinity to in our tests. * Import `uv_thread_getaffinity` from `print_process_affinity.jl` * Call `uv_thread_getaffinity` only if `AFFINITY_SUPPORTED` * Fix a syntax error Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com> (cherry picked from commit 32b1305)
When running on a machine with
cpusets
applied, we are unable toassign CPU affinity to CPUs 1 and 2; we may be locked to CPUs 9-16, for
example. So we must inspect what our current cpumask is, and from that
select CPUs that we can safely assign affinity to in our tests.