diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2023-01-10 19:40:04 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-02-05 00:17:33 +0100 |
commit | da494896914a327476ab7e0298619d742a6205d4 (patch) | |
tree | 700db7b14d148c492b1fb0295462fee2214239ed /freebsd/FreeBSDProcessList.c | |
parent | f1da8cfa28cce46cc7a4ab1661be35e2173155ab (diff) |
Add support for scheduling policies
Add a process column for scheduling policy to show the current
scheduling policy of the process.
Add a the ability to change the scheduling policy of a process via the
key 'Y'.
Currently implemented on Linux and FreeBSD only but should be portable,
since sched_getscheduler(2) is part of POSIX.1-2001.
Closes: #1161
Diffstat (limited to 'freebsd/FreeBSDProcessList.c')
-rw-r--r-- | freebsd/FreeBSDProcessList.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 9ee5ea40..98447df9 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -34,6 +34,7 @@ in the source distribution for its full text. #include "Object.h" #include "Process.h" #include "ProcessList.h" +#include "Scheduling.h" #include "Settings.h" #include "XUtils.h" #include "generic/openzfs_sysctl.h" @@ -606,6 +607,11 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { if (Process_isKernelThread(proc)) super->kernelThreads++; +#ifdef SCHEDULER_SUPPORT + if (settings->ss->flags & PROCESS_FLAG_SCHEDPOL) + Scheduling_readProcessPolicy(proc); +#endif + proc->show = ! ((hideKernelThreads && Process_isKernelThread(proc)) || (hideUserlandThreads && Process_isUserlandThread(proc))); super->totalTasks++; |