set nice values for non RT processes (#20812)

* set nice values for non RT processes

* builds

* fix qcom build

Co-authored-by: Comma Device <device@comma.ai>
pull/20784/head^2
Adeeb Shihadeh 2021-05-04 22:00:11 -07:00 committed by GitHub
parent bea9cc14d3
commit ec414e2eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,6 @@
#include <sys/time.h>
#include <sys/resource.h>
#include "locationd.h"
using namespace EKFS;
@ -376,6 +379,8 @@ int Localizer::locationd_thread() {
}
int main() {
setpriority(PRIO_PROCESS, 0, -20);
Localizer localizer;
return localizer.locationd_thread();
}

View File

@ -1,3 +1,6 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <android/log.h>
#include <log/logger.h>
#include <log/logprint.h>
@ -6,8 +9,9 @@
#include "messaging.h"
int main() {
ExitHandler do_exit;
setpriority(PRIO_PROCESS, 0, -15);
ExitHandler do_exit;
PubMaster pm({"androidLog"});
log_time last_log_time = {};

View File

@ -326,8 +326,7 @@ void clear_locks() {
} // namespace
int main(int argc, char** argv) {
setpriority(PRIO_PROCESS, 0, -12);
setpriority(PRIO_PROCESS, 0, -20);
clear_locks();

View File

@ -1,5 +1,7 @@
#include <unistd.h>
#include <dirent.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <cstdio>
#include <cstdlib>
@ -30,6 +32,8 @@ struct ProcCache {
}
int main() {
setpriority(PRIO_PROCESS, 0, -15);
PubMaster publisher({"procLog"});
double jiffy = sysconf(_SC_CLK_TCK);

View File

@ -220,7 +220,7 @@ void sensor_loop() {
}// Namespace end
int main(int argc, char *argv[]) {
setpriority(PRIO_PROCESS, 0, -13);
setpriority(PRIO_PROCESS, 0, -18);
signal(SIGPIPE, (sighandler_t)sigpipe_handler);
sensor_loop();

View File

@ -93,6 +93,6 @@ int sensor_loop() {
}
int main(int argc, char *argv[]) {
setpriority(PRIO_PROCESS, 0, -13);
setpriority(PRIO_PROCESS, 0, -18);
return sensor_loop();
}