Re: [PATCH V4 3/3] scsi: core: avoid to pre-allocate big chunk for sg list

2019-04-29 Thread Bart Van Assche
On Sun, 2019-04-28 at 15:39 +0800, Ming Lei wrote: > Now scsi_mq_setup_tags() pre-allocates a big buffer for IO sg list, > and the buffer size is scsi_mq_sgl_size() which depends on smaller > value between shost->sg_tablesize and SG_CHUNK_SIZE. > > Modern HBA's DMA is often capable of deadling wit

[PATCH V4 3/3] scsi: core: avoid to pre-allocate big chunk for sg list

2019-04-28 Thread Ming Lei
Now scsi_mq_setup_tags() pre-allocates a big buffer for IO sg list, and the buffer size is scsi_mq_sgl_size() which depends on smaller value between shost->sg_tablesize and SG_CHUNK_SIZE. Modern HBA's DMA is often capable of deadling with very big segment number, so scsi_mq_sgl_size() is often big