Skip to content

Commit

Permalink
init: Limit MTP rx/tx buffers to 16384
Browse files Browse the repository at this point in the history
Limit MTP_RX_BUFFER_INIT_SIZE and MTP_TX_BUFFER_INIT_SIZE
from 1048576 to 16384

Should fix swiotlb running OOM with large file transfers.

See sonyxperiadev/bug_tracker#432 (comment)

Needs accompanying sepolicy.
  • Loading branch information
ix5 committed Sep 7, 2019
1 parent b18d038 commit 33d7aec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rootdir/vendor/etc/init/init.loire.rc
Expand Up @@ -48,6 +48,12 @@ on boot
# to one of the CPU from the default IRQ affinity mask.
write /proc/irq/default_smp_affinity f

# MTP kernel parameters - needed so that swiotlb does not run OOM
chown system system /sys/module/usb_f_mtp/parameters/mtp_rx_req_len
chown system system /sys/module/usb_f_mtp/parameters/mtp_tx_req_len
write /sys/module/usb_f_mtp/parameters/mtp_rx_req_len 16384
write /sys/module/usb_f_mtp/parameters/mtp_tx_req_len 16384

on property:bluetooth.isEnabled=true
write /sys/class/bluetooth/hci0/idle_timeout 7000

Expand Down

0 comments on commit 33d7aec

Please sign in to comment.