WifiVendorHal: improve handling of debug events
Move processing of debug events (onRingBufferDataAvailable
and onDebugErrorAlert) from a HWBinder thread, to the
WifiStateMachine thread.
The idea here is to quickly free up shared resources: the
thread on which we receive the HIDL event, and the HWBinder
async buffer space that is used to queue pending upcalls.
The reason we want to free up these resources more quickly
is that, in some cases, the debug events need to wait
100-200msec to acquire the WifiDiagnostics object's
intrinsic lock.
A risk of this change is that we might use a large amount
of memory by queuing up large amounts of ring-buffer data
callbacks on the Looper's MessageQueue. However, I think
that is a better risk to take, than the risk of starving
other HALs of access to HWBinder resources.
Bug: 38182372
Test: tests/wifitests/runtests.sh # on bullhead
Test: adb shell dumpsys wifi | grep TIMEOUT # expect no match
Change-Id: I7ec24f8b862cfb8ac100b1c975d732a886ed09fe
2 files changed