From: Ming Lei <ming.lei@redhat.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-block@vger.kernel.org, Ming Lei <ming.lei@redhat.com>,
Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bvanassche@acm.org>,
"Ewan D . Milne" <emilne@redhat.com>,
Hannes Reinecke <hare@suse.com>
Subject: [PATCH V2 0/2] scis: core: avoid big pre-allocation for sg list
Date: Wed, 24 Apr 2019 17:35:38 +0800 [thread overview]
Message-ID: <20190424093540.15526-1-ming.lei@redhat.com> (raw)
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 any more 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.
V2:
- move inline sg table initializetion into one helper
- introduce new helper for getting inline sg
- comment log fix
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 | 78 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 55 insertions(+), 23 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>
--
2.9.5
next reply other threads:[~2019-04-24 9:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 9:35 Ming Lei [this message]
2019-04-24 9:35 ` [PATCH V2 1/2] scsi: core: avoid to pre-allocate big chunk for protection meta data Ming Lei
2019-04-24 14:37 ` Christoph Hellwig
2019-04-25 9:37 ` Ming Lei
2019-04-25 11:20 ` Ming Lei
2019-04-24 9:35 ` [PATCH V2 2/2] scsi: core: avoid to pre-allocate big chunk for sg list Ming Lei
2019-04-24 14:33 ` [PATCH V2 0/2] scis: core: avoid big pre-allocation " Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190424093540.15526-1-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=emilne@redhat.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).