From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
"Ewan D . Milne" <emilne@redhat.com>,
Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 2/2] scsi: core: avoid to pre-allocate big chunk for sg list
Date: Wed, 24 Apr 2019 15:52:34 +0800 [thread overview]
Message-ID: <20190424075233.GA32345@ming.t460p> (raw)
In-Reply-To: <1556033835.161891.123.camel@acm.org>
On Tue, Apr 23, 2019 at 08:37:15AM -0700, Bart Van Assche wrote:
> On Tue, 2019-04-23 at 18:32 +0800, Ming Lei wrote:
> > #define SCSI_INLINE_PROT_SG_CNT 1
> >
> > +#define SCSI_INLINE_SG_CNT 2
>
> So this patch inserts one kmalloc() and one kfree() call in the hot path
> for every SCSI request with more than two elements in its scatterlist? Isn't
Slab or its variants are designed for fast path, and NVMe PCI uses slab
for allocating sg list in fast path too.
> "2" too low? Or in other words, what is the performance impact of this patch
> for a real-world workload?
2 is used by NVMe PCI for a while, and even recently it is reduced to 1.
I have run big BS(256k) fio test on scsi_debug(can_queue: 256, submit queues: 12 LUNs: 4,
delay: 0, io sched: none), not see obvious performance difference by this patch.
Thanks,
Ming
next prev parent reply other threads:[~2019-04-24 7:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 10:32 [PATCH 0/2] scis: core: avoid big pre-allocation for sg list Ming Lei
2019-04-23 10:32 ` [PATCH 1/2] scsi: core: avoid to pre-allocate big chunk for protection meta data Ming Lei
2019-04-23 15:33 ` Bart Van Assche
2019-04-24 0:46 ` Ming Lei
2019-04-23 10:32 ` [PATCH 2/2] scsi: core: avoid to pre-allocate big chunk for sg list Ming Lei
2019-04-23 15:37 ` Bart Van Assche
2019-04-24 7:52 ` Ming Lei [this message]
2019-04-24 15:24 ` James Bottomley
2019-04-24 15:32 ` Bart Van Assche
2019-04-24 15:37 ` Jens Axboe
2019-04-24 15:49 ` James Bottomley
2019-04-24 16:09 ` Bart Van Assche
2019-04-24 16:17 ` James Bottomley
2019-04-24 5:53 ` Christoph Hellwig
2019-04-24 8:41 ` Ming Lei
2019-04-24 14:38 ` Christoph Hellwig
2019-04-25 0:45 ` Ming Lei
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=20190424075233.GA32345@ming.t460p \
--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).