Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NTB: memcpy lockup workaround

The system will appear to lockup for long periods of time due to the NTB
driver spending too much time in memcpy. Avoid this by reducing the
number of packets that can be serviced on a given interrupt.

Signed-off-by: Jon Mason <jon.mason@intel.com>

Jon Mason c336acd3 c9d534c8

+8 -3
+8 -3
drivers/ntb/ntb_transport.c
··· 1034 1034 static void ntb_transport_rx(unsigned long data) 1035 1035 { 1036 1036 struct ntb_transport_qp *qp = (struct ntb_transport_qp *)data; 1037 - int rc; 1037 + int rc, i; 1038 1038 1039 - do { 1039 + /* Limit the number of packets processed in a single interrupt to 1040 + * provide fairness to others 1041 + */ 1042 + for (i = 0; i < qp->rx_max_entry; i++) { 1040 1043 rc = ntb_process_rxc(qp); 1041 - } while (!rc); 1044 + if (rc) 1045 + break; 1046 + } 1042 1047 } 1043 1048 1044 1049 static void ntb_transport_rxc_db(void *data, int db_num)