Avoid freezeing the core from LWIP under FreeRTOS #1884

Merged
earlephilhower merged 5 commits from f2 into master 2023-12-06 20:41:15 +03:00
earlephilhower commented 2023-12-05 22:56:33 +03:00 (Migrated from github.com)

Avoid issues with interrupts and priority inversions and other deadlocks and use a SW based random generator for LWIP when under FreeRTOS.

This means removing any overrides for sleep_until and the two get_rand_xx calls from the SDK, making things much saner.

Related to #1883, #1872, and other random FreeRTOS lockups.

Avoid issues with interrupts and priority inversions and other deadlocks and use a SW based random generator for LWIP when under FreeRTOS. This means removing any overrides for sleep_until and the two get_rand_xx calls from the SDK, making things much saner. Related to #1883, #1872, and other random FreeRTOS lockups.
earlephilhower commented 2023-12-05 22:57:45 +03:00 (Migrated from github.com)

@GUVWAF would you be able to try this PR with your app? It removes the whole need for the IRQ-level freeze/unfreeze and actually should be faster overall since we don't need to freeze the opposite core every time LWIP asks for a random number (i.e. for a port assignment or backoff timer).

@GUVWAF would you be able to try this PR with your app? It removes the whole need for the IRQ-level freeze/unfreeze and actually should be faster overall since we don't need to freeze the opposite core every time LWIP asks for a random number (i.e. for a port assignment or backoff timer).
GUVWAF commented 2023-12-05 23:20:21 +03:00 (Migrated from github.com)

Ah, this sounds like a better overall solution indeed. Thanks for looking so deeply into it.
I'll try it by letting it run overnight with debugger.

Ah, this sounds like a better overall solution indeed. Thanks for looking so deeply into it. I'll try it by letting it run overnight with debugger.
GUVWAF commented 2023-12-06 20:36:57 +03:00 (Migrated from github.com)

All seems fine with this. I’ve not observed a hang during two 10-hour tests (had to replace my set-up once).

Thanks a lot!

All seems fine with this. I’ve not observed a hang during two 10-hour tests (had to replace my set-up once). Thanks a lot!
earlephilhower commented 2023-12-06 20:40:52 +03:00 (Migrated from github.com)

Great news. Thanks for the update!

Great news. Thanks for the update!
Sign in to join this conversation.