New settings for governors, +30% memory bandwidth (#2590)
* new settings for governors, +30% memory bandwidth
* CPU waste is better
* warm up frame_drop
* optional CORE arg for rtshield
* back off priorities of processes not critical to driving
* if it doesn't drive, it's not realtime
* err, resource. this should have been included
* reverse order to not spike
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 917eff8c30
commatwo_master
parent
fc8b7c6c6c
commit
6b32f79ae6
8 changed files with 43 additions and 8 deletions
Binary file not shown.
@ -1,16 +1,20 @@ |
||||
#!/usr/bin/env python3 |
||||
import os |
||||
import time |
||||
from common.realtime import set_core_affinity, set_realtime_priority |
||||
|
||||
|
||||
# RT shield - ensure CPU 3 always remains available for RT processes |
||||
# runs as SCHED_FIFO with minimum priority to ensure kthreads don't |
||||
# get scheduled onto CPU 3, but it's always preemptible by realtime |
||||
# openpilot processes |
||||
|
||||
def main(): |
||||
set_core_affinity(3) |
||||
set_core_affinity(int(os.getenv("CORE", "3"))) |
||||
set_realtime_priority(1) |
||||
|
||||
while True: |
||||
time.sleep(0.000001) |
||||
|
||||
if __name__ == "__main__": |
||||
main() |
||||
|
||||
|
Loading…
Reference in new issue