summaryrefslogtreecommitdiff
path: root/libpackagelistparser/packagelistparser_test.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2018-10-11 16:33:05 -0700
committerJosh Gao <jmgao@google.com>2018-10-19 17:53:18 -0700
commitc51726cbec6f985ed46ea942205f896ee37c08c6 (patch)
treebf25785691990a4d3e999e83ea6c1d52873b5a08 /libpackagelistparser/packagelistparser_test.cpp
parent61e9e39b7e83f6e1c5189bcd95471dfa95aca6d5 (diff)
adbd: implement a nonblocking USB Connection.
Implement a Connection that implements a nonblocking interface to functionfs, to replace the existing implementation that uses two threads that loop and call read and write respectively. The existing implementation is vulnerable to a race condition that can occur when a connection is terminated, where one thread can notice failure and complete reinitialization of the USB endpoints before the other thread noticed anything went wrong, resulting in either the first packet coming from the other end disappearing in to the void, or the other end getting a packet of garbage. As a side benefit, this improves performance on walleye from: push 100MiB: 10 runs: median 49.48 MiB/s, mean 50.00 MiB/s, stddev: 2.77 MiB/s pull 100MiB: 10 runs: median 75.82 MiB/s, mean 76.18 MiB/s, stddev: 6.60 MiB/s to: push 100MiB: 10 runs: median 73.90 MiB/s, mean 73.51 MiB/s, stddev: 5.26 MiB/s pull 100MiB: 10 runs: median 105.90 MiB/s, mean 107.19 MiB/s, stddev: 6.10 MiB/s Test: python test_device.py Change-Id: I9b77c1057965edfef739ed9736e5d76613adf60a
Diffstat (limited to 'libpackagelistparser/packagelistparser_test.cpp')
0 files changed, 0 insertions, 0 deletions