diff options
author | John Kacur <jkacur@redhat.com> | 2021-10-28 00:50:12 -0400 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2021-10-28 11:37:10 -0400 |
commit | 1dd72d9db74b063c8dd96f13701a14e299abc325 (patch) | |
tree | 1703a8e641f5b2216b8f024b57bd268194a40e6b | |
parent | 72bc6170cc71bc3563e4e89bfa17a7b0227b22c3 (diff) | |
download | tuna-1dd72d9db74b063c8dd96f13701a14e299abc325.tar.gz |
tuna: Print warning if setting affinity results in EBUSY and continue
When trying to isolate a CPU, if a device uses SCHED_DEADLINE and admission
control is enabled, setting the affinity will result in the error EBUSY.
tuna should print a warning that this pid could not be moved, and
continue.
The user can either ignore the warning or use other measures to isolate
the cpu such as booting with isolcpus or turning off admission control
and rerunning the tuna isolate command and then turning admission
control back on.
Signed-off-by: John Kacur <jkacur@redhat.com>
-rwxr-xr-x | tuna/tuna.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tuna/tuna.py b/tuna/tuna.py index 591206d..f25eb3d 100755 --- a/tuna/tuna.py +++ b/tuna/tuna.py @@ -360,6 +360,10 @@ def isolate_cpus(cpus, nr_cpus): if err.args[0] == errno.EINVAL: print("Function:", fname, ",", err.strerror, file=sys.stderr) sys.exit(2) + if err.args[0] == errno.EBUSY: + comm = ps[pid].stat["comm"] + print(f'Warning: Unable to isolate pid {pid} [{comm}]') + continue raise err if "threads" not in ps[pid]: |