Use PF_KTHREAD to identify kernel threads
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
parent
09d8ebf469
commit
4f5cb7e4fb
1 changed files with 1 additions and 1 deletions
|
|
@ -199,7 +199,7 @@ class SchedulerPlugin(base.Plugin):
|
|||
if process["stat"].is_bound_to_cpu():
|
||||
if process["stat"]["state"] == "Z":
|
||||
log.debug("Affinity of zombie task with PID %s cannot be changed, the task's affinity mask is fixed." % pid)
|
||||
elif len(process["cmdline"]) == 0:
|
||||
elif process["stat"]["flags"] & procfs.pidstat.PF_KTHREAD != 0:
|
||||
log.debug("Affinity of kernel thread with PID %s cannot be changed, the task's affinity mask is fixed." % pid)
|
||||
else:
|
||||
log.warn("Affinity of task with PID %s cannot be changed, the task's affinity mask is fixed." % pid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue