Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beautiful camera timings #34558

Merged
merged 5 commits into from
Feb 15, 2025
Merged

Beautiful camera timings #34558

merged 5 commits into from
Feb 15, 2025

Conversation

adeebshihadeh
Copy link
Contributor

@adeebshihadeh adeebshihadeh commented Feb 9, 2025

Fixes so far:

The test catches #34541.

@adeebshihadeh adeebshihadeh added this to the 0.9.8 milestone Feb 9, 2025
@adeebshihadeh adeebshihadeh force-pushed the cam-checks branch 2 times, most recently from 9c893c2 to aecf154 Compare February 13, 2025 02:08
@adeebshihadeh adeebshihadeh changed the title test_onroad: update camera checks Beautiful camera timings Feb 13, 2025
@adeebshihadeh
Copy link
Contributor Author

adeebshihadeh commented Feb 15, 2025

Finally got something beautiful with everything running

roadCameraState             50.00    0.06   50.13   49.84
driverCameraState           50.00    0.05   50.13   49.89
wideRoadCameraState         50.00    0.09   50.24   49.78

roadCameraState             50.00    0.06   50.13   49.84
driverCameraState           50.00    0.05   50.13   49.89
wideRoadCameraState         50.00    0.08   50.24   49.78

roadCameraState             50.00    0.05   50.13   49.84
driverCameraState           50.00    0.05   50.13   49.89
wideRoadCameraState         50.00    0.08   50.24   49.78

The camera kernel driver makes extensive use of workqueues, which aren't really meant to be realtime. These results are from some minor driver mods + isolcpus on the camerad core.

    kworker/6:1H-3352  [006] ....    77.566385: workqueue_execute_start: work struct fffffff35dcb2318: function cam_sync_util_cb_dispatch
    kworker/6:1H-3352  [006] d..2    77.566399: workqueue_queue_work: work struct=fffffff42c612700 function=cam_req_mgr_process_workq workqueue=fffffff42c5f4800 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.566405: workqueue_execute_start: work struct fffffff42c612700: function cam_req_mgr_process_workq
          <idle>-0     [006] d.h5    77.573194: workqueue_queue_work: work struct=fffffff42c612900 function=cam_req_mgr_process_workq workqueue=fffffff42c5f4a00 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.573208: workqueue_execute_start: work struct fffffff42c612900: function cam_req_mgr_process_workq
           <...>-53261 [006] d..2    77.573275: workqueue_queue_work: work struct=fffffff4190e3d00 function=cam_req_mgr_process_workq workqueue=fffffff3cc0d9000 req_cpu=8 cpu=6
           <...>-53261 [006] d..2    77.574504: workqueue_queue_work: work struct=fffffff425aba500 function=cam_req_mgr_process_workq workqueue=fffffff3d6617e00 req_cpu=8 cpu=6
           <...>-53261 [006] d..2    77.574584: workqueue_queue_work: work struct=fffffff3dcf9a100 function=cam_req_mgr_process_workq workqueue=fffffff3dcfc6000 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.577910: workqueue_execute_start: work struct fffffff4190e3d00: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] ....    77.577921: workqueue_execute_start: work struct fffffff425aba500: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] ....    77.577931: workqueue_execute_start: work struct fffffff3dcf9a100: function cam_req_mgr_process_workq
          <idle>-0     [006] d.s4    77.601681: workqueue_queue_work: work struct=fffffff4190e3d00 function=cam_req_mgr_process_workq workqueue=fffffff3cc0d9000 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.601755: workqueue_execute_start: work struct fffffff4190e3d00: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] d.h1    77.601829: workqueue_queue_work: work struct=fffffff35dcb2c10 function=cam_hw_cdm_work workqueue=fffffff42cadae00 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.601840: workqueue_execute_start: work struct fffffff35dcb2c10: function cam_hw_cdm_work
          <idle>-0     [006] d.s4    77.609134: workqueue_queue_work: work struct=fffffff425aba500 function=cam_req_mgr_process_workq workqueue=fffffff3d6617e00 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.609155: workqueue_execute_start: work struct fffffff425aba500: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] d.h1    77.609190: workqueue_queue_work: work struct=fffffff35dcb2c90 function=cam_hw_cdm_work workqueue=fffffff42cadae00 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.609200: workqueue_execute_start: work struct fffffff35dcb2c90: function cam_hw_cdm_work
          <idle>-0     [006] d.s4    77.609446: workqueue_queue_work: work struct=fffffff3dcf9a100 function=cam_req_mgr_process_workq workqueue=fffffff3dcfc6000 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.609465: workqueue_execute_start: work struct fffffff3dcf9a100: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] d.h1    77.609498: workqueue_queue_work: work struct=fffffff35dcb2c10 function=cam_hw_cdm_work workqueue=fffffff42cadae00 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.609510: workqueue_execute_start: work struct fffffff35dcb2c10: function cam_hw_cdm_work
          <idle>-0     [006] d.s4    77.616350: workqueue_queue_work: work struct=fffffff35dcb2918 function=cam_sync_util_cb_dispatch workqueue=fffffff42cad8200 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.616391: workqueue_execute_start: work struct fffffff35dcb2918: function cam_sync_util_cb_dispatch
    kworker/6:1H-3352  [006] d..2    77.616406: workqueue_queue_work: work struct=fffffff42c612700 function=cam_req_mgr_process_workq workqueue=fffffff42c5f4800 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.616411: workqueue_execute_start: work struct fffffff42c612700: function cam_req_mgr_process_workq
          <idle>-0     [006] d.h5    77.623233: workqueue_queue_work: work struct=fffffff42c612900 function=cam_req_mgr_process_workq workqueue=fffffff42c5f4a00 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.623248: workqueue_execute_start: work struct fffffff42c612900: function cam_req_mgr_process_workq
           <...>-53261 [006] d..2    77.623308: workqueue_queue_work: work struct=fffffff4190e3d00 function=cam_req_mgr_process_workq workqueue=fffffff3cc0d9000 req_cpu=8 cpu=6
           <...>-53261 [006] d..2    77.624530: workqueue_queue_work: work struct=fffffff425aba500 function=cam_req_mgr_process_workq workqueue=fffffff3d6617e00 req_cpu=8 cpu=6
           <...>-53261 [006] d..2    77.624610: workqueue_queue_work: work struct=fffffff3dcf9a100 function=cam_req_mgr_process_workq workqueue=fffffff3dcfc6000 req_cpu=8 cpu=6
    kworker/6:1H-3352  [006] ....    77.627927: workqueue_execute_start: work struct fffffff4190e3d00: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] ....    77.627937: workqueue_execute_start: work struct fffffff425aba500: function cam_req_mgr_process_workq
    kworker/6:1H-3352  [006] ....    77.627947: workqueue_execute_start: work struct fffffff3dcf9a100: function cam_req_mgr_process_workq

@adeebshihadeh adeebshihadeh merged commit 958c8d1 into master Feb 15, 2025
17 checks passed
@adeebshihadeh adeebshihadeh deleted the cam-checks branch February 15, 2025 05:33
Edison-CBS pushed a commit to Edison-CBS/openpilot that referenced this pull request Feb 15, 2025
* the start of something beautiful

* mv that

* cleanup

* cleanup output

* the good stuff

---------

Co-authored-by: Comma Device <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant