From: Kashyap Desai <kashyap.desai@broadcom.com>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Mike Snitzer <snitzer@redhat.com>
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Arun Easi <arun.easi@cavium.com>, Omar Sandoval <osandov@fb.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
Christoph Hellwig <hch@lst.de>,
Don Brace <don.brace@microsemi.com>,
Peter Rivera <peter.rivera@broadcom.com>,
Laurence Oberman <loberman@redhat.com>
Subject: RE: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset
Date: Wed, 28 Feb 2018 20:28:48 +0530 [thread overview]
Message-ID: <8113cfe7e8db7060db920ab29e230a89@mail.gmail.com> (raw)
In-Reply-To: <20180227100750.32299-9-ming.lei@redhat.com>
Ming -
Quick testing on my setup - Performance slightly degraded (4-5% drop)for
megaraid_sas driver with this patch. (From 1610K IOPS it goes to 1544K)
I confirm that after applying this patch, we have #queue = #numa node.
ls -l
/sys/devices/pci0000:80/0000:80:02.0/0000:83:00.0/host10/target10:2:23/10:
2:23:0/block/sdy/mq
total 0
drwxr-xr-x. 18 root root 0 Feb 28 09:53 0
drwxr-xr-x. 18 root root 0 Feb 28 09:53 1
I would suggest to skip megaraid_sas driver changes using shared_tagset
until and unless there is obvious gain. If overall interface of using
shared_tagset is commit in kernel tree, we will investigate (megaraid_sas
driver) in future about real benefit of using it.
Without patch -
4.64% [megaraid_sas] [k] complete_cmd_fusion
3.23% [kernel] [k] irq_entries_start
3.18% [kernel] [k] _raw_spin_lock
3.06% [kernel] [k] syscall_return_via_sysret
2.74% [kernel] [k] bt_iter
2.55% [kernel] [k] scsi_queue_rq
2.21% [megaraid_sas] [k] megasas_build_io_fusion
1.80% [megaraid_sas] [k] megasas_queue_command
1.59% [kernel] [k] __audit_syscall_exit
1.55% [kernel] [k] _raw_spin_lock_irqsave
1.38% [megaraid_sas] [k] megasas_build_and_issue_cmd_fusion
1.34% [kernel] [k] do_io_submit
1.33% [kernel] [k] gup_pgd_range
1.26% [kernel] [k] scsi_softirq_done
1.20% fio [.] __fio_gettime
1.20% [kernel] [k] switch_mm_irqs_off
1.00% [megaraid_sas] [k] megasas_build_ldio_fusion
0.97% fio [.] get_io_u
0.89% [kernel] [k] lookup_ioctx
0.80% [kernel] [k] scsi_dec_host_busy
0.78% [kernel] [k] blkdev_direct_IO
0.78% [megaraid_sas] [k] MR_GetPhyParams
0.73% [kernel] [k] aio_read_events
0.70% [megaraid_sas] [k] MR_BuildRaidContext
0.64% [kernel] [k] blk_mq_complete_request
0.64% fio [.] thread_main
0.63% [kernel] [k] blk_queue_split
0.63% [kernel] [k] blk_mq_get_request
0.61% [kernel] [k] read_tsc
0.59% [kernel] [k] kmem_cache_a
With patch -
4.36% [megaraid_sas] [k] complete_cmd_fusion
3.24% [kernel] [k] irq_entries_start
3.00% [kernel] [k] syscall_return_via_sysret
2.41% [kernel] [k] scsi_queue_rq
2.41% [kernel] [k] _raw_spin_lock
2.22% [megaraid_sas] [k] megasas_build_io_fusion
1.92% [kernel] [k] bt_iter
1.74% [megaraid_sas] [k] megasas_queue_command
1.48% [kernel] [k] gup_pgd_range
1.44% [kernel] [k] __audit_syscall_exit
1.33% [megaraid_sas] [k] megasas_build_and_issue_cmd_fusion
1.29% [kernel] [k] _raw_spin_lock_irqsave
1.25% fio [.] get_io_u
1.24% fio [.] __fio_gettime
1.22% [kernel] [k] do_io_submit
1.18% [megaraid_sas] [k] megasas_build_ldio_fusion
1.02% [kernel] [k] blk_mq_get_request
0.91% [kernel] [k] lookup_ioctx
0.91% [kernel] [k] scsi_softirq_done
0.88% [kernel] [k] scsi_dec_host_busy
0.87% [kernel] [k] blkdev_direct_IO
0.77% [megaraid_sas] [k] MR_BuildRaidContext
0.76% [megaraid_sas] [k] MR_GetPhyParams
0.73% [kernel] [k] __fget
0.70% [kernel] [k] switch_mm_irqs_off
0.70% fio [.] thread_main
0.69% [kernel] [k] aio_read_events
0.68% [kernel] [k] note_interrupt
0.65% [kernel] [k] do_syscal
Kashyap
> -----Original Message-----
> From: Ming Lei [mailto:ming.lei@redhat.com]
> Sent: Tuesday, February 27, 2018 3:38 PM
> To: Jens Axboe; linux-block@vger.kernel.org; Christoph Hellwig; Mike
Snitzer
> Cc: linux-scsi@vger.kernel.org; Hannes Reinecke; Arun Easi; Omar
Sandoval;
> Martin K . Petersen; James Bottomley; Christoph Hellwig; Don Brace;
Kashyap
> Desai; Peter Rivera; Laurence Oberman; Ming Lei
> Subject: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via
> .host_tagset
>
> It is observed on null_blk that IOPS can be improved much by simply
making
> hw queue per NUMA node, so this patch applies the introduced
.host_tagset
> for improving performance.
>
> In reality, .can_queue is quite big, and NUMA node number is often
small, so
> each hw queue's depth should be high enough to saturate device.
>
> Cc: Arun Easi <arun.easi@cavium.com>
> Cc: Omar Sandoval <osandov@fb.com>,
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
> Cc: James Bottomley <james.bottomley@hansenpartnership.com>,
> Cc: Christoph Hellwig <hch@lst.de>,
> Cc: Don Brace <don.brace@microsemi.com>
> Cc: Kashyap Desai <kashyap.desai@broadcom.com>
> Cc: Peter Rivera <peter.rivera@broadcom.com>
> Cc: Laurence Oberman <loberman@redhat.com>
> Cc: Hannes Reinecke <hare@suse.de>
> Cc: Mike Snitzer <snitzer@redhat.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
> drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 065956cb2aeb..0b46f97cbfdb 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -3177,6 +3177,7 @@ static struct scsi_host_template megasas_template
> = {
> .use_clustering = ENABLE_CLUSTERING,
> .change_queue_depth = scsi_change_queue_depth,
> .no_write_same = 1,
> + .host_tagset = 1,
> };
>
> /**
> @@ -5947,6 +5948,8 @@ static int megasas_start_aen(struct
> megasas_instance *instance) static int megasas_io_attach(struct
> megasas_instance *instance) {
> struct Scsi_Host *host = instance->host;
> + /* 256 tags should be high enough to saturate device */
> + int max_queues = DIV_ROUND_UP(host->can_queue, 256);
>
> /*
> * Export parameters required by SCSI mid-layer @@ -5987,6 +5990,9
> @@ static int megasas_io_attach(struct megasas_instance *instance)
> host->max_lun = MEGASAS_MAX_LUN;
> host->max_cmd_len = 16;
>
> + /* per NUMA node hw queue */
> + host->nr_hw_queues = min_t(int, nr_node_ids, max_queues);
> +
> /*
> * Notify the mid-layer about the new controller
> */
> --
> 2.9.5
next prev parent reply other threads:[~2018-02-28 14:58 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 10:07 [PATCH V3 0/8] blk-mq & scsi: fix reply queue selection and improve host wide tagset Ming Lei
2018-02-27 10:07 ` [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue Ming Lei
2018-03-01 16:18 ` Don Brace
2018-03-01 19:01 ` Laurence Oberman
2018-03-01 21:19 ` Laurence Oberman
2018-03-02 2:16 ` Ming Lei
2018-03-02 14:09 ` Laurence Oberman
2018-03-02 15:03 ` Don Brace
2018-03-02 21:53 ` Laurence Oberman
2018-03-05 2:07 ` Ming Lei
2018-03-06 17:55 ` Martin K. Petersen
2018-03-06 19:24 ` Martin K. Petersen
2018-03-07 0:00 ` Ming Lei
2018-03-07 3:14 ` Martin K. Petersen
2018-03-07 14:11 ` Laurence Oberman
2018-03-08 13:42 ` Ming Lei
2018-03-08 20:56 ` Laurence Oberman
2018-03-05 7:23 ` Kashyap Desai
2018-03-05 14:35 ` Don Brace
2018-03-05 15:19 ` Mike Snitzer
2018-03-02 0:47 ` Ming Lei
2018-03-08 7:50 ` Christoph Hellwig
2018-03-08 8:15 ` Ming Lei
2018-03-08 8:41 ` Hannes Reinecke
2018-03-08 9:19 ` Ming Lei
2018-03-08 15:31 ` Bart Van Assche
2018-02-27 10:07 ` [PATCH V3 2/8] scsi: megaraid_sas: " Ming Lei
2018-02-27 10:07 ` [PATCH V3 3/8] blk-mq: introduce 'start_tag' field to 'struct blk_mq_tags' Ming Lei
2018-03-08 7:51 ` Christoph Hellwig
2018-02-27 10:07 ` [PATCH V3 4/8] blk-mq: introduce BLK_MQ_F_HOST_TAGS Ming Lei
2018-03-08 7:52 ` Christoph Hellwig
2018-03-08 9:35 ` Ming Lei
2018-02-27 10:07 ` [PATCH V3 5/8] scsi: Add template flag 'host_tagset' Ming Lei
2018-02-27 10:07 ` [PATCH V3 6/8] block: null_blk: introduce module parameter of 'g_host_tags' Ming Lei
2018-02-27 10:07 ` [PATCH V3 7/8] scsi: hpsa: improve scsi_mq performance via .host_tagset Ming Lei
2018-03-08 7:54 ` Christoph Hellwig
2018-03-08 10:59 ` Ming Lei
2018-02-27 10:07 ` [PATCH V3 8/8] scsi: megaraid: " Ming Lei
2018-02-28 14:58 ` Kashyap Desai [this message]
2018-02-28 15:21 ` Ming Lei
2018-02-28 16:22 ` Laurence Oberman
2018-03-01 5:24 ` Kashyap Desai
2018-03-01 7:58 ` Ming Lei
2018-03-07 5:27 ` Ming Lei
2018-03-07 15:01 ` Kashyap Desai
2018-03-07 16:05 ` Ming Lei
2018-03-07 17:28 ` Kashyap Desai
2018-03-08 1:15 ` Ming Lei
2018-03-08 10:04 ` Kashyap Desai
2018-03-08 11:06 ` Ming Lei
2018-03-08 11:23 ` Ming Lei
2018-03-09 6:56 ` Kashyap Desai
2018-03-09 8:13 ` Ming Lei
2018-03-01 21:46 ` [PATCH V3 0/8] blk-mq & scsi: fix reply queue selection and improve host wide tagset Laurence Oberman
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=8113cfe7e8db7060db920ab29e230a89@mail.gmail.com \
--to=kashyap.desai@broadcom.com \
--cc=arun.easi@cavium.com \
--cc=axboe@kernel.dk \
--cc=don.brace@microsemi.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.com \
--cc=peter.rivera@broadcom.com \
--cc=snitzer@redhat.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).