mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 21:42:05 +08:00
tici: move real-time processes to high-performance cores (#20634)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user