Improve realtime performance on NEOS (#2166)

* fix setting core affinity

* dmonitoringd doesn't need rt priority

* android only gets two cores

* model and planner get core 2

* log missed cycle count

* neos update

* prod image

* revert NEOS changes

* still need this
old-commit-hash: ef21b83937d25b824018ac1d07fa7759ae6f8128
This commit is contained in:
Adeeb Shihadeh
2020-09-16 15:33:12 -07:00
committed by GitHub
parent d864dc4cf1
commit bdf52941c8
10 changed files with 38 additions and 55 deletions
+2 -5
View File
@@ -1,10 +1,9 @@
#!/usr/bin/env python3
import os
import gc
from cereal import car, log
from common.hardware import HARDWARE
from common.numpy_fast import clip
from common.realtime import sec_since_boot, set_realtime_priority, set_core_affinity, Ratekeeper, DT_CTRL
from common.realtime import sec_since_boot, config_rt_process, Priority, Ratekeeper, DT_CTRL
from common.profiler import Profiler
from common.params import Params, put_nonblocking
import cereal.messaging as messaging
@@ -43,9 +42,7 @@ EventName = car.CarEvent.EventName
class Controls:
def __init__(self, sm=None, pm=None, can_sock=None):
gc.disable()
set_realtime_priority(53)
set_core_affinity(3)
config_rt_process(3, Priority.CTRL_HIGH)
# Setup sockets
self.pm = pm