Yocto Linux, gatesgarth. We have a thread that must meet a deadline. We start the thread with SCHED_FIFO and set the thread priority to 54. (the policy and number was determined through experimentation) This has worked well on the i.MX8MQ in previous kernels. We then ported the code to the i.MX8MP and gatesgarth, kernel 5.10.9. And for the most part, it still works.
But new to the mix is a USB port with USB type A 2.0 connector. We've used the USB port previously, but the device was hardwired, no connector.
When I insert a USB memory stick, the thread misses its deadline, every time. I removed any systemd automounts or other reactions to the stick insertion, only what is built into the kernel remains, AFAICT, but no change.
What follows is what is emitted to dmesg on insertion. Any clues as to what could be going wrong, or what I might do to lower the impact of the USB driver?
John
[ 173.488190] usb 1-1.4: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.02
[ 173.496583] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 173.504058] usb 1-1.4: Product: Flash Disk
[ 173.508349] usb 1-1.4: SerialNumber: 68174233
[ 173.516238] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 173.522909] scsi host0: usb-storage 1-1.4:1.0
[ 174.589628] scsi 0:0:0:0: Direct-Access Flash Disk 8.07 PQ: 0 ANSI: 2
[ 174.599359] sd 0:0:0:0: [sda] 120832 512-byte logical blocks: (61.9 MB/59.0 MiB)
[ 174.607241] sd 0:0:0:0: [sda] Write Protect is off
[ 174.612086] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[ 174.612466] sd 0:0:0:0: [sda] No Caching mode page found
[ 174.617800] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 174.633985] sda: sda1
[ 174.638844] sd 0:0:0:0: [sda] Attached SCSI removable disk