tici: move real-time processes to high-performance cores (#20634)

old-commit-hash: 8ede1b30aa
vw-mqb-aeb
Willem Melching 4 years ago committed by GitHub
parent 0cf4fcb35c
commit 811746959e
  1. 5
      selfdrive/boardd/boardd.cc
  2. 2
      selfdrive/controls/controlsd.py
  3. 3
      selfdrive/controls/plannerd.py
  4. 3
      selfdrive/controls/radard.py

@ -571,7 +571,12 @@ int main() {
// set process priority and affinity
err = set_realtime_priority(54);
LOG("set priority returns %d", err);
#ifdef QCOM2
err = set_core_affinity(7);
#else
err = set_core_affinity(3);
#endif
LOG("set affinity returns %d", err);
panda_set_power(true);

@ -45,7 +45,7 @@ EventName = car.CarEvent.EventName
class Controls:
def __init__(self, sm=None, pm=None, can_sock=None):
config_realtime_process(3, Priority.CTRL_HIGH)
config_realtime_process(7 if TICI else 3, Priority.CTRL_HIGH)
# Setup sockets
self.pm = pm

@ -10,8 +10,7 @@ import cereal.messaging as messaging
def plannerd_thread(sm=None, pm=None):
config_realtime_process(2, Priority.CTRL_LOW)
config_realtime_process(5 if TICI else 2, Priority.CTRL_LOW)
cloudlog.info("plannerd is waiting for CarParams")
params = Params()

@ -12,6 +12,7 @@ from selfdrive.config import RADAR_TO_CAMERA
from selfdrive.controls.lib.cluster.fastcluster_py import cluster_points_centroid
from selfdrive.controls.lib.radar_helpers import Cluster, Track
from selfdrive.swaglog import cloudlog
from selfdrive.hardware import TICI
class KalmanParams():
@ -173,7 +174,7 @@ class RadarD():
# fuses camera and radar data for best lead detection
def radard_thread(sm=None, pm=None, can_sock=None):
config_realtime_process(2, Priority.CTRL_LOW)
config_realtime_process(5 if TICI else 2, Priority.CTRL_LOW)
# wait for stats about the car to come in from controls
cloudlog.info("radard is waiting for CarParams")

Loading…
Cancel
Save