1
0
Fork 0

scheduler: Log process info when its affinity cannot be changed

Include its current affinity, cmdline, and cgroup. This may help
identify issues with tuning, e.g., in cases when the process
disappears soon after affining it fails.

Resolves: RHEL-69933
This commit is contained in:
Pavol Žáčik 2024-12-06 10:36:34 +01:00
parent 90c24eea03
commit 55e272e263
No known key found for this signature in database
GPG key ID: B99527D5E6487A92

View file

@ -661,6 +661,9 @@ class SchedulerPlugin(base.Plugin):
log.warning("Affinity of task with PID %d cannot be changed, the task's affinity mask is fixed."
% pid)
return True
log.info("Task %d cmdline: %s" % (pid, self._get_cmdline(process)))
log.info("Task %d cgroup: %s" % (pid, self._get_stat_cgroup(process)))
log.info("Task %d affinity: %s" % (pid, list(self._scheduler_utils.get_affinity(pid))))
except (OSError, IOError) as e:
if e.errno == errno.ENOENT or e.errno == errno.ESRCH:
log.debug("Failed to get task info for PID %d, the task vanished."