1
0
Fork 0

Merge pull request #91 from olysonek/kthread

Use PF_KTHREAD to identify kernel threads
This commit is contained in:
Jaroslav Škarvada 2018-02-28 15:21:53 +01:00 committed by GitHub
commit 7b5fa2728a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)