Skip to content

Commit

Permalink
Revert "usb: gadget: mtp: Increase RX transfer length to 1M"
Browse files Browse the repository at this point in the history
This reverts commit c044ad0.

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>
Change-Id: Ibf436a73c6b16af9b79aa987c9df69791f81f8a1
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: TogoFire <togofire@mailfence.com>
  • Loading branch information
kerneltoast authored and TogoFire committed May 24, 2023
1 parent e614d91 commit 2308842
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/gadget/function/f_mtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_TX_BUFFER_INIT_SIZE 1048576
#define MTP_BULK_BUFFER_SIZE 16384
#define INTR_BUFFER_SIZE 28
Expand Down Expand Up @@ -93,7 +92,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_TX_BUFFER_INIT_SIZE;
Expand Down

0 comments on commit 2308842

Please sign in to comment.