mbox series

[0/2] scis: core: avoid big pre-allocation for sg list

Message ID 20190423103240.29864-1-ming.lei@redhat.com (mailing list archive)
Headers show
Series scis: core: avoid big pre-allocation for sg list | expand

Message

Ming Lei April 23, 2019, 10:32 a.m. UTC
Hi,

Since supporting to blk-mq, big pre-allocation for sg list is
introduced, this way is very unfriendly wrt. memory consumption.

There were Red Hat internal reports that some scsi_debug based tests
can't be run because of too big pre-allocation.

Also lpfc users commplained that 1GB+ ram is pre-allocatd for single
HBA.

The two patches try to address this issue by allocating sg list runtime,
meantime pre-allocating one or two inline sg entries for small IO. This
ways follows NVMe's approach wrt. sg list allocation.


Ming Lei (2):
  scsi: core: avoid to pre-allocate big chunk for protection meta data
  scsi: core: avoid to pre-allocate big chunk for sg list

 drivers/scsi/scsi_lib.c | 60 +++++++++++++++++++++++++++++++++++++------------
 1 file changed, 46 insertions(+), 14 deletions(-)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Ewan D. Milne <emilne@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>