adbd: tune USB read/write sizes and queue depths.
Reduce the operation sizes to sizes that are small enough that the kernel will run the OOM killer to try to make them succeed. Compensate for the smaller operation sizes by increasing the queue depth. Bug: http://b/126582877 Test: benchmark_device.py Change-Id: I4d351f56c8f83fea882614238cc3fec8ba1e9bf9
This commit is contained in:
parent
b416f2252e
commit
5841a96afc
|
@ -57,11 +57,11 @@ using android::base::StringPrintf;
|
|||
// We can't find out whether we have support for AIO on ffs endpoints until we submit a read.
|
||||
static std::optional<bool> gFfsAioSupported;
|
||||
|
||||
static constexpr size_t kUsbReadQueueDepth = 16;
|
||||
static constexpr size_t kUsbReadSize = 16384;
|
||||
static constexpr size_t kUsbReadQueueDepth = 32;
|
||||
static constexpr size_t kUsbReadSize = 8 * PAGE_SIZE;
|
||||
|
||||
static constexpr size_t kUsbWriteQueueDepth = 16;
|
||||
static constexpr size_t kUsbWriteSize = 16 * PAGE_SIZE;
|
||||
static constexpr size_t kUsbWriteQueueDepth = 32;
|
||||
static constexpr size_t kUsbWriteSize = 8 * PAGE_SIZE;
|
||||
|
||||
static const char* to_string(enum usb_functionfs_event_type type) {
|
||||
switch (type) {
|
||||
|
|
Loading…
Reference in New Issue