scheduler: Don't tune a process if reading original parameters failed
We should not touch a process if we cannot later revert to it's original state. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
parent
5ad1f42beb
commit
bfc670dffc
1 changed files with 5 additions and 0 deletions
|
|
@ -246,6 +246,11 @@ class SchedulerPlugin(base.Plugin):
|
|||
scheduler = rt[0],
|
||||
priority = rt[1],
|
||||
affinity = prev_affinity)
|
||||
else:
|
||||
if self._pid_exists(pid):
|
||||
log.error("Refusing to tune PID %d, reading original scheduling parameters failed."
|
||||
% pid)
|
||||
return
|
||||
self._set_rt(pid, self._schedcfg2param(sched), prio)
|
||||
if affinity != "*":
|
||||
self._set_affinity(pid, affinity)
|
||||
|
|
|
|||
Loading…
Reference in a new issue