summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-08-06 16:45:30 +1000
committerBenBE <BenBE@geshi.org>2021-08-09 07:56:13 +0200
commit1bd95983b2703cb313ea301367ff3199fabd1f9d (patch)
treede70612626231c6f522ddf1a43ef36ec041fbb48 /linux/LinuxProcess.h
parentaa0424ade806715ea0f410dc068a1eb648300bb9 (diff)
Add columns for process autogroup identifier and nice value
Adds AGRP (autogroup) and ANI (autogroup nice) columns that report the information from /proc/PID/autogroup, as well as handlers for '{' and '}' to change the autogroup nice value. This is guarded by /proc/sys/kernel/sched_autogroup_enabled such that sampling and/or changing values wont be attempted unless the kernel feature is enabled. Fixes: #720
Diffstat (limited to 'linux/LinuxProcess.h')
-rw-r--r--linux/LinuxProcess.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 5f77db2e..bca5247a 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -28,6 +28,7 @@ in the source distribution for its full text.
#define PROCESS_FLAG_LINUX_SECATTR 0x00008000
#define PROCESS_FLAG_LINUX_LRS_FIX 0x00010000
#define PROCESS_FLAG_LINUX_DELAYACCT 0x00040000
+#define PROCESS_FLAG_LINUX_AUTOGROUP 0x00080000
typedef struct LinuxProcess_ {
Process super;
@@ -99,6 +100,10 @@ typedef struct LinuxProcess_ {
unsigned long ctxt_diff;
char* secattr;
unsigned long long int last_mlrs_calctime;
+
+ /* Autogroup scheduling (CFS) information */
+ long int autogroup_id;
+ int autogroup_nice;
} LinuxProcess;
extern int pageSize;
@@ -117,6 +122,10 @@ IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this);
bool LinuxProcess_setIOPriority(Process* this, Arg ioprio);
+bool LinuxProcess_isAutogroupEnabled(void);
+
+bool LinuxProcess_changeAutogroupPriorityBy(Process* this, Arg delta);
+
bool Process_isThread(const Process* this);
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy