mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user