Revert "usb: gadget: mtp: Increase RX transfer length to 1M"

This reverts commit 0db49c2550a09458db188fb7312c66783c5af104.

This results in kmalloc() abuse to find a large number of contiguous
pages, which thrashes the page allocator and hurts overall performance.
I couldn't reproduce the improved MTP throughput that this commit
claimed either, so just revert it.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Ruchit <ruchitmarathe@gmail.com>
fourteen
Sultan Alsawaf 5 years ago committed by Jenna
parent f1e33d3e21
commit 0b2b6cd70f
  1. 3
      drivers/usb/gadget/function/f_mtp.c

@ -55,7 +55,6 @@
ipc_log_string(_mtp_ipc_log, "%s: " fmt, __func__, ##__VA_ARGS__)
#endif
#define MTP_RX_BUFFER_INIT_SIZE 1048576
#define MTP_BULK_BUFFER_SIZE 16384
#define INTR_BUFFER_SIZE 28
#define MAX_INST_NAME_LEN 40
@ -92,7 +91,7 @@
#define MAX_ITERATION 100
unsigned int mtp_rx_req_len = MTP_RX_BUFFER_INIT_SIZE;
unsigned int mtp_rx_req_len = MTP_BULK_BUFFER_SIZE;
module_param(mtp_rx_req_len, uint, 0644);
unsigned int mtp_tx_req_len = MTP_BULK_BUFFER_SIZE;

Loading…
Cancel
Save