Re: [PATCH 0/7] hisi_sas: Misc bugfixes and an optimisation patch

2018-10-11 Thread Ming Lei
On Thu, Oct 11, 2018 at 02:12:11PM +0100, John Garry wrote: > On 11/10/2018 11:15, Christoph Hellwig wrote: > > On Thu, Oct 11, 2018 at 10:59:11AM +0100, John Garry wrote: > > > > > > > blk-mq tags are always per-host (which has actually caused problems for > > > > ATA, which is now using its own

Re: SCSI regression

2018-08-24 Thread Ming Lei
On Fri, Aug 24, 2018 at 06:33:29PM -0600, Jens Axboe wrote: > On 8/24/18 6:21 PM, Jens Axboe wrote: > > On 8/24/18 5:16 PM, Ming Lei wrote: > >> Hi, > >> > >> On Fri, Aug 24, 2018 at 04:20:41PM -0600, Jens Axboe wrote: > >>> Hi, > >

Re: SCSI regression

2018-08-24 Thread Ming Lei
Hi, On Fri, Aug 24, 2018 at 04:20:41PM -0600, Jens Axboe wrote: > Hi, > > Was testing other things today, but ended up with this: > > # echo "write through" > /sys/block/sde/device/scsi_disk/4:0:0:0/cache_type > > hanging. Looking closer, the request is successfully queued and the > caller is

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 02:06:11PM +0200, Johannes Thumshirn wrote: > On Wed, Aug 01, 2018 at 08:00:44PM +0800, Ming Lei wrote: > > On Wed, Aug 01, 2018 at 07:52:19PM +0800, Ming Lei wrote: > > > On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > > > > O

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 07:52:19PM +0800, Ming Lei wrote: > On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > > On 1 August 2018 at 11:59, Mark Brown wrote: > > > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > > > > > >> You may have

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 12:24:00PM +0100, Matt Hart wrote: > On 1 August 2018 at 11:59, Mark Brown wrote: > > On Wed, Aug 01, 2018 at 06:51:09PM +0800, Ming Lei wrote: > > > >> You may have to provide some clue, such as dmesg log, boot disk, ... > > > >> I

Re: next/master boot: 179 boots: 11 failed, 167 passed with 1 offline (next-20180731)

2018-08-01 Thread Ming Lei
On Wed, Aug 01, 2018 at 11:33:03AM +0100, Mark Brown wrote: > On Wed, Aug 01, 2018 at 11:05:36AM +0100, Guillaume Tucker wrote: > > On 31/07/18 16:14, kernelci.org bot wrote: > > > > Boot Regressions Detected: > > [...] > > > x86: > > > > > > x86_64_defconfig: > > > qemu: > > >

Re: [RFC] scsi: switch to scsi-mq by default

2018-07-03 Thread Ming Lei
ult" > + default y > depends on SCSI > ---help--- > This option enables the new blk-mq based I/O path for SCSI > -- > 2.16.4 > Reviewed-by: Ming Lei thanks, Ming Lei

Re: [PATCH 03/14] nvme: return BLK_EH_DONE from ->timeout

2018-05-23 Thread Ming Lei
On Wed, May 23, 2018 at 02:19:30PM +0200, Christoph Hellwig wrote: > NVMe always completes the request before returning from ->timeout, either > by polling for it, or by disabling the controller. Return BLK_EH_DONE so > that the block layer doesn't even try to complete it again. > >

Re: Performance drop due to "blk-mq-sched: improve sequential I/O performance"

2018-05-12 Thread Ming Lei
ther things recently. Please test the following host_tagset patches which is against recent linus tree(v4.17-rc4+) https://github.com/ming1/linux/commits/v4.16-rc-host-tags-v5 And please post the perf trace without and with this patchset if possible. Thanks, Ming Lei

Re: Performance drop due to "blk-mq-sched: improve sequential I/O performance"

2018-05-02 Thread Ming Lei
On Wed, May 02, 2018 at 03:32:53PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Wednesday, May 2, 2018 3:17 PM > > To: Kashyap Desai > > Cc: linux-scsi@vger.kernel.org; linux-bl...@vger.kernel.or

Re: Performance drop due to "blk-mq-sched: improve sequential I/O performance"

2018-05-02 Thread Ming Lei
On Wed, May 02, 2018 at 01:13:34PM +0530, Kashyap Desai wrote: > Hi Ming, > > I was running some performance test on latest 4.17-rc and figure out > performance drop (approximate 15% drop) due to below patch set. > https://marc.info/?l=linux-block=150802309522847=2 > > I observed drop on latest

Re: [PATCH 0/3] scsi: scsi-mq: don't hold host_busy in IO path

2018-04-28 Thread Ming Lei
On Fri, Apr 27, 2018 at 09:39:47AM -0600, Jens Axboe wrote: > On 4/27/18 9:31 AM, Bart Van Assche wrote: > > On Fri, 2018-04-20 at 14:57 +0800, Ming Lei wrote: > >> This patches removes the expensive atomic opeation on host-wide counter > >> of .host_busy for scsi-mq, a

Re: [PATCH 3/3] scsi: avoid to hold host-wide counter of host_busy for scsi_mq

2018-04-28 Thread Ming Lei
On Fri, Apr 27, 2018 at 04:16:48PM +, Bart Van Assche wrote: > On Fri, 2018-04-20 at 14:57 +0800, Ming Lei wrote: > > +struct scsi_host_mq_in_flight { > > + int cnt; > > +}; > > + > > +static void scsi_host_check_in_flight(struct request *rq, void *da

Re: [PATCH 2/3] scsi: read host_busy via scsi_host_busy()

2018-04-28 Thread Ming Lei
On Fri, Apr 27, 2018 at 03:51:46PM +, Bart Van Assche wrote: > On Fri, 2018-04-20 at 14:57 +0800, Ming Lei wrote: > > show_host_busy(struct device *dev, struct device_attribute *attr, char > > *buf) > > { > > struct Scsi_Host *shost = class_to_shost(dev); >

[PATCH 3/3] scsi: avoid to hold host-wide counter of host_busy for scsi_mq

2018-04-20 Thread Ming Lei
ai <kashyap.de...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/hosts.c| 24 +++- drivers/scsi/scsi_li

[PATCH 2/3] scsi: read host_busy via scsi_host_busy()

2018-04-20 Thread Ming Lei
Hellwig <h...@lst.de>, Cc: Don Brace <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <m

[PATCH 0/3] scsi: scsi-mq: don't hold host_busy in IO path

2018-04-20 Thread Ming Lei
Hi, This patches removes the expensive atomic opeation on host-wide counter of .host_busy for scsi-mq, and it is observed that IOPS can be increased by 15% with this change in IO test over scsi_debug. Ming Lei (3): scsi: introduce scsi_host_busy() scsi: read host_busy via scsi_host_busy

[PATCH 1/3] scsi: introduce scsi_host_busy()

2018-04-20 Thread Ming Lei
tnership.com>, Cc: Christoph Hellwig <h...@lst.de>, Cc: Don Brace <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Laurence Oberman <lober...@redhat.com> Sign

[PATCH] target: fix crash with iscsi target and dvd

2018-04-16 Thread Ming Lei
.@wdc.com> Cc: target-de...@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Nicholas A. Bellinger" <n...@linux-iscsi.org> Cc: Christoph Hellwig <h...@lst.de> Fixes: 84c8590646d5b35804 ("target: avoid accessing .bi_vcnt directly") Signed-off-by: Ming L

Re: 4.15.14 crash with iscsi target and dvd

2018-04-12 Thread Ming Lei
On Thu, Apr 12, 2018 at 09:43:02PM -0400, Wakko Warner wrote: > Ming Lei wrote: > > On Tue, Apr 10, 2018 at 08:45:25PM -0400, Wakko Warner wrote: > > > Sorry for the delay. I reverted my change, added this one. I didn't > > > reboot, I just unloaded and loaded thi

Re: 4.15.14 crash with iscsi target and dvd

2018-04-12 Thread Ming Lei
On Tue, Apr 10, 2018 at 08:45:25PM -0400, Wakko Warner wrote: > Ming Lei wrote: > > Sure, thanks for your sharing. > > > > Wakko, could you test the following patch and see if there is any > > difference? > > > > -- > > diff --git a/drivers/tar

Re: [PATCH] scsi_debug: IMMED related delay adjustments

2018-04-10 Thread Ming Lei
delay is active, for F_SSU_DELAY want at least 1 >* second and if sdebug_jdelay>0 want a long delay of that > - * many seconds. > + * many seconds; for F_SYNC_DELAY want 1/20 of that. >*/ > int jdelay = (sdebug

Re: 4.15.14 crash with iscsi target and dvd

2018-04-09 Thread Ming Lei
On Mon, Apr 09, 2018 at 07:43:01PM -0400, Wakko Warner wrote: > Ming Lei wrote: > > On Mon, Apr 09, 2018 at 09:30:11PM +, Bart Van Assche wrote: > > > Hello Ming, > > > > > > Can you have a look at this? The start of this e-mail thread is available > &g

Re: 4.15.14 crash with iscsi target and dvd

2018-04-09 Thread Ming Lei
ac60eb58b145839b5893e > > Author: Ming Lei <tom.leim...@gmail.com> > > Date: Fri Nov 11 20:05:32 2016 +0800 > > > > target: avoid accessing .bi_vcnt directly > > > > When the bio is full, bio_add_pc_page() will return zero, > > so

Re: [PATCH v2] scsi_debug: implement IMMED bit

2018-04-08 Thread Ming Lei
On Sun, Apr 08, 2018 at 01:30:30PM -0400, Douglas Gilbert wrote: > On 2018-04-07 10:23 PM, Ming Lei wrote: > > On Fri, Feb 09, 2018 at 09:36:39PM -0500, Douglas Gilbert wrote: > > > The Start Stop Unit (SSU) command takes in the order of a second to > > > complete

Re: [PATCH v2] scsi_debug: implement IMMED bit

2018-04-07 Thread Ming Lei
On Fri, Feb 09, 2018 at 09:36:39PM -0500, Douglas Gilbert wrote: > The Start Stop Unit (SSU) command takes in the order of a second to > complete on some SAS SSDs and longer on hard disks. Synchronize Cache (SC) > can also take some time. Both commands have an IMMED bit in their cdbs for > those

Re: [PATCH 1/3] blk-mq: Allow PCI vector offset for mapping queues

2018-03-27 Thread Ming Lei
inux/blk-mq-pci.h > index 6338551e0fb9..9f4c17f0d2d8 100644 > --- a/include/linux/blk-mq-pci.h > +++ b/include/linux/blk-mq-pci.h > @@ -5,6 +5,7 @@ > struct blk_mq_tag_set; > struct pci_dev; > > -int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev); > +int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev, > + int offset); > > #endif /* _LINUX_BLK_MQ_PCI_H */ > -- > 2.14.3 > Reviewed-by: Ming Lei <ming@redhat.com> -- Ming

Re: [PATCH V5 1/5] scsi: hpsa: fix selection of reply queue

2018-03-19 Thread Ming Lei
On Mon, Mar 19, 2018 at 04:42:09PM +0200, Artem Bityutskiy wrote: > On Mon, 2018-03-19 at 08:31 -0600, Jens Axboe wrote: > > I'm assuming that Martin will eventually queue this up. But probably > > for 4.17, then we can always flag it for a backport to stable once > > it's been thoroughly tested.

Re: [Possible REGRESSION, 4.16-rc4] Error updating SMART data during runtime and could not connect to lvmetad at some boot attempts

2018-03-13 Thread Ming Lei
On Tue, Mar 13, 2018 at 02:08:23PM +0100, Martin Steigerwald wrote: > Hans de Goede - 11.03.18, 15:37: > > Hi Martin, > > > > On 11-03-18 09:20, Martin Steigerwald wrote: > > > Hello. > > > > > > Since 4.16-rc4 (upgraded from 4.15.2 which worked) I have an issue > > > with SMART checks

[PATCH V5 5/5] scsi: virtio_scsi: unify scsi_host_template

2018-03-13 Thread Ming Lei
en" <martin.peter...@oracle.com>, Cc: James Bottomley <james.bottom...@hansenpartnership.com>, Cc: Christoph Hellwig <h...@lst.de>, Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: Ha

[PATCH V5 3/5] scsi: introduce force_blk_mq

2018-03-13 Thread Ming Lei
osemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Laurence Oberman <lober...@redhat.com> Reviewed-by: Hannes Reinecke <h...@suse.de> Reviewed-by: Christoph Hellwig <h...@lst.de> Signed-off-by: Ming Lei <ming@redhat.com>

[PATCH V5 4/5] scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity

2018-03-13 Thread Ming Lei
Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs") Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/virtio_scsi.c | 59 +++--

[PATCH V5 2/5] scsi: megaraid_sas: fix selection of reply queue

2018-03-13 Thread Ming Lei
redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Meelis Roos <mr...@linux.ee> Cc: Artem Bityutskiy <artem.bityuts...@intel.com> Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs") Signed-off-by: Ming Lei <ming@redh

[PATCH V5 1/5] scsi: hpsa: fix selection of reply queue

2018-03-13 Thread Ming Lei
..@intel.com> Acked-by: Don Brace <don.br...@microsemi.com> Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs") Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/hpsa.c | 73 +++-- drivers/s

[PATCH V5 0/5] SCSI: fix selection of reply(hw) queue

2018-03-13 Thread Ming Lei
- cover legacy vector for megaraid_sas(2/5) - patch style change (4/5) - add one virtio-scsi cleanup patch(5/5) V4: - splitted from previous patchset - handle virtio-scsi by force_blk_mq Ming Lei (5): scsi: hpsa: fix selection of reply queue scsi: megarai

Re: [PATCH V4 1/4] scsi: hpsa: fix selection of reply queue

2018-03-12 Thread Ming Lei
On Mon, Mar 12, 2018 at 08:52:02AM +0100, Christoph Hellwig wrote: > On Sat, Mar 10, 2018 at 11:01:43PM +0800, Ming Lei wrote: > > > I really dislike this being open coded in drivers. It really should > > > be helper chared with the blk-mq map building that drivers just use.

Re: [PATCH V4 4/4] scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity

2018-03-12 Thread Ming Lei
On Sat, Mar 10, 2018 at 11:15:20AM +0100, Christoph Hellwig wrote: > This looks generally fine to me: > > Reviewed-by: Christoph Hellwig > > As a follow on we should probably kill virtscsi_queuecommand_single and > thus virtscsi_host_template_single as well. > > Given storage IO is

Re: [PATCH V4 1/4] scsi: hpsa: fix selection of reply queue

2018-03-10 Thread Ming Lei
On Sat, Mar 10, 2018 at 11:09:59AM +0100, Christoph Hellwig wrote: > > +static void hpsa_setup_reply_map(struct ctlr_info *h) > > +{ > > + const struct cpumask *mask; > > + unsigned int queue, cpu; > > + > > + for (queue = 0; queue < h->msix_vectors; queue++) { > > + mask =

Re: [PATCH V4 2/4] scsi: megaraid_sas: fix selection of reply queue

2018-03-09 Thread Ming Lei
On Fri, Mar 09, 2018 at 04:37:56PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Friday, March 9, 2018 9:02 AM > > To: James Bottomley; Jens Axboe; Martin K . Petersen > > Cc: Christoph Hellw

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-03-09 Thread Ming Lei
On Fri, Mar 09, 2018 at 12:26:57PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Thursday, March 8, 2018 4:54 PM > > To: Kashyap Desai > > Cc: Jens Axboe; linux-bl...@vger.kernel.org; Chr

Re: [PATCH V4 0/4] SCSI: fix selection of reply(hw) queue

2018-03-08 Thread Ming Lei
On Fri, Mar 09, 2018 at 08:00:52AM +0100, Hannes Reinecke wrote: > On 03/09/2018 04:32 AM, Ming Lei wrote: > > Hi All, > > > > The patches fixes reply queue(virt-queue on virtio-scsi) selection on hpsa, > > megaraid_sa and virtio-scsi, and IO hang can be

[PATCH V4 4/4] scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity

2018-03-08 Thread Ming Lei
d-by: Paolo Bonzini <pbonz...@redhat.com> Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs") Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/virtio_scsi.c | 59 +++--- 1 file changed, 3 insertions(+),

[PATCH V4 2/4] scsi: megaraid_sas: fix selection of reply queue

2018-03-08 Thread Ming Lei
redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Meelis Roos <mr...@linux.ee> Cc: Artem Bityutskiy <artem.bityuts...@intel.com> Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs") Signed-off-by: Ming Lei <ming@redha

[PATCH V4 1/4] scsi: hpsa: fix selection of reply queue

2018-03-08 Thread Ming Lei
dhat.com> Cc: Meelis Roos <mr...@linux.ee> Cc: Artem Bityutskiy <artem.bityuts...@intel.com> Cc: Mike Snitzer <snit...@redhat.com> Tested-by: Laurence Oberman <lober...@redhat.com> Tested-by: Don Brace <don.br...@microsemi.com> Fixes: 84676c1f21e8 ("genirq/af

[PATCH V4 0/4] SCSI: fix selection of reply(hw) queue

2018-03-08 Thread Ming Lei
fix-V4 V4: - splitted from previous patchset - handle virtio-scsi by force_blk_mq Ming Lei (4): scsi: hpsa: fix selection of reply queue scsi: megaraid_sas: fix selection of reply queue scsi: introduce force_blk_mq scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity dr

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-08 Thread Ming Lei
On Wed, Mar 07, 2018 at 09:11:37AM -0500, Laurence Oberman wrote: > On Tue, 2018-03-06 at 14:24 -0500, Martin K. Petersen wrote: > > Ming, > > > > > Given both Don and Laurence have verified that patch 1 and patch 2 > > > does fix IO hang, could you consider to merge the two first? > > > > Oh,

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-03-08 Thread Ming Lei
On Thu, Mar 08, 2018 at 07:06:25PM +0800, Ming Lei wrote: > On Thu, Mar 08, 2018 at 03:34:31PM +0530, Kashyap Desai wrote: > > > -Original Message- > > > From: Ming Lei [mailto:ming@redhat.com] > > > Sent: Thursday, March 8, 2018 6:46 AM > > >

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-03-08 Thread Ming Lei
On Thu, Mar 08, 2018 at 03:34:31PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Thursday, March 8, 2018 6:46 AM > > To: Kashyap Desai > > Cc: Jens Axboe; linux-bl...@vger.kernel.org; Chr

Re: [PATCH V3 7/8] scsi: hpsa: improve scsi_mq performance via .host_tagset

2018-03-08 Thread Ming Lei
On Thu, Mar 08, 2018 at 08:54:43AM +0100, Christoph Hellwig wrote: > > + /* 256 tags should be high enough to saturate device */ > > + int max_queues = DIV_ROUND_UP(h->scsi_host->can_queue, 256); > > + > > + /* per NUMA node hw queue */ > > + h->scsi_host->nr_hw_queues = min_t(int,

Re: [PATCH V3 4/8] blk-mq: introduce BLK_MQ_F_HOST_TAGS

2018-03-08 Thread Ming Lei
On Thu, Mar 08, 2018 at 08:52:52AM +0100, Christoph Hellwig wrote: > On Tue, Feb 27, 2018 at 06:07:46PM +0800, Ming Lei wrote: > > This patch can support to partition host-wide tags to multiple hw queues, > > so each hw queue related data structures(tags, hctx) can be accessed in &g

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-08 Thread Ming Lei
On Thu, Mar 08, 2018 at 09:41:16AM +0100, Hannes Reinecke wrote: > On 03/08/2018 09:15 AM, Ming Lei wrote: > > On Thu, Mar 08, 2018 at 08:50:35AM +0100, Christoph Hellwig wrote: > >>> +static void hpsa_setup_reply_map(struct ctlr_info *h) > >>> +{ &

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-08 Thread Ming Lei
On Thu, Mar 08, 2018 at 08:50:35AM +0100, Christoph Hellwig wrote: > > +static void hpsa_setup_reply_map(struct ctlr_info *h) > > +{ > > + const struct cpumask *mask; > > + unsigned int queue, cpu; > > + > > + for (queue = 0; queue < h->msix_vectors; queue++) { > > + mask =

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-03-07 Thread Ming Lei
On Wed, Mar 07, 2018 at 10:58:34PM +0530, Kashyap Desai wrote: > > > > > > Also one observation using V3 series patch. I am seeing below Affinity > > > mapping whereas I have only 72 logical CPUs. It means we are really > > > not going to use all reply queues. > > > e.a If I bind fio jobs on CPU

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-03-07 Thread Ming Lei
On Wed, Mar 07, 2018 at 08:31:31PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Wednesday, March 7, 2018 10:58 AM > > To: Kashyap Desai > > Cc: Jens Axboe; linux-bl...@vger.kernel.org; Chr

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-03-06 Thread Ming Lei
On Wed, Feb 28, 2018 at 08:28:48PM +0530, Kashyap Desai wrote: > 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.

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-06 Thread Ming Lei
On Tue, Mar 06, 2018 at 02:24:25PM -0500, Martin K. Petersen wrote: > > Ming, > > > Given both Don and Laurence have verified that patch 1 and patch 2 > > does fix IO hang, could you consider to merge the two first? > > Oh, and I would still need a formal Acked-by: from Don and Tested-by: >

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-04 Thread Ming Lei
On Fri, Mar 02, 2018 at 04:53:21PM -0500, Laurence Oberman wrote: > On Fri, 2018-03-02 at 15:03 +, Don Brace wrote: > > > -Original Message- > > > From: Laurence Oberman [mailto:lober...@redhat.com] > > > Sent: Friday, March 02, 2018 8:09 AM > >

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-01 Thread Ming Lei
On Thu, Mar 01, 2018 at 04:19:34PM -0500, Laurence Oberman wrote: > On Thu, 2018-03-01 at 14:01 -0500, Laurence Oberman wrote: > > On Thu, 2018-03-01 at 16:18 +, Don Brace wrote: > > > > -Original Message----- > > > > From: Ming Lei [mailto:ming@

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-01 Thread Ming Lei
Hi Don, Thanks for your test! On Thu, Mar 01, 2018 at 04:18:17PM +, Don Brace wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Tuesday, February 27, 2018 4:08 AM > > To: Jens Axboe <ax...@kernel.dk>; linux-bl

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-02-28 Thread Ming Lei
On Thu, Mar 01, 2018 at 10:54:17AM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Laurence Oberman [mailto:lober...@redhat.com] > > Sent: Wednesday, February 28, 2018 9:52 PM > > To: Ming Lei; Kashyap Desai > > Cc: Jens Axboe; linux-bl...@vger

Re: [PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-02-28 Thread Ming Lei
On Wed, Feb 28, 2018 at 08:28:48PM +0530, Kashyap Desai wrote: > 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.

[PATCH V3 8/8] scsi: megaraid: improve scsi_mq performance via .host_tagset

2018-02-27 Thread Ming Lei
ce <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Ming

[PATCH V3 7/8] scsi: hpsa: improve scsi_mq performance via .host_tagset

2018-02-27 Thread Ming Lei
ce <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Ming Lei

[PATCH V3 5/8] scsi: Add template flag 'host_tagset'

2018-02-27 Thread Ming Lei
c: Mike Snitzer <snit...@redhat.com> Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/scsi_lib.c | 2 ++ include/scsi/scsi_host.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scs

[PATCH V3 6/8] block: null_blk: introduce module parameter of 'g_host_tags'

2018-02-27 Thread Ming Lei
t;h...@lst.de>, Cc: Don Brace <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: Hannes Reinecke <h...@suse.de> Cc: Mike Snitzer <snit...@redhat.com> Sig

[PATCH V3 4/8] blk-mq: introduce BLK_MQ_F_HOST_TAGS

2018-02-27 Thread Ming Lei
on Brace <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Cc: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> ---

[PATCH V3 2/8] scsi: megaraid_sas: fix selection of reply queue

2018-02-27 Thread Ming Lei
com.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: Meelis Roos <mr...@linux.ee> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/megaraid/megaraid_sas.h| 2 +- drivers/scsi/megaraid/

[PATCH V3 3/8] blk-mq: introduce 'start_tag' field to 'struct blk_mq_tags'

2018-02-27 Thread Ming Lei
kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- block/blk-mq-tag.c | 3 ++- block/blk-mq-tag.h | 6 -- block/blk-mq.c | 7 --- 3 files changed, 10 insertions(+)

[PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-02-27 Thread Ming Lei
: Peter Rivera <peter.riv...@broadcom.com> Cc: Laurence Oberman <lober...@redhat.com> Cc: Meelis Roos <mr...@linux.ee> Fixes: 84676c1f21e8 ("genirq/affinity: assign vectors to all possible CPUs") Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/hpsa.c

[PATCH V3 0/8] blk-mq & scsi: fix reply queue selection and improve host wide tagset

2018-02-27 Thread Ming Lei
-v3.2 thanks, Ming Hannes Reinecke (1): scsi: Add template flag 'host_tagset' Ming Lei (7): scsi: hpsa: fix selection of reply queue scsi: megaraid_sas: fix selection of reply queue blk-mq: introduce 'start_tag' field to 'struct blk_mq_tags' blk-mq: introduce BLK_MQ_F_HOST_TAGS block

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-12 Thread Ming Lei
Hi Kashyap, On Tue, Feb 13, 2018 at 12:05:14AM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Sunday, February 11, 2018 11:01 AM > > To: Kashyap Desai > > Cc: Hannes Reinecke; Jens Axboe; linux-bl

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-10 Thread Ming Lei
On Sat, Feb 10, 2018 at 09:00:57AM +0800, Ming Lei wrote: > Hi Kashyap, > > On Fri, Feb 09, 2018 at 02:12:16PM +0530, Kashyap Desai wrote: > > > -Original Message- > > > From: Ming Lei [mailto:ming@redhat.com] > > > Sent: Friday, February 9, 2

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-09 Thread Ming Lei
Hi Kashyap, On Fri, Feb 09, 2018 at 02:12:16PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Friday, February 9, 2018 11:01 AM > > To: Kashyap Desai > > Cc: Hannes Reinecke; Jens Axboe; linux-bl

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-08 Thread Ming Lei
On Fri, Feb 09, 2018 at 10:28:23AM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Thursday, February 8, 2018 10:23 PM > > To: Hannes Reinecke > > Cc: Kashyap Desai; Jens Axboe; linux-bl...@vger.ker

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-08 Thread Ming Lei
On Thu, Feb 08, 2018 at 08:00:29AM +0100, Hannes Reinecke wrote: > On 02/07/2018 03:14 PM, Kashyap Desai wrote: > >> -Original Message- > >> From: Ming Lei [mailto:ming@redhat.com] > >> Sent: Wednesday, February 7, 2018 5:53 PM > >> To: Hanne

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-07 Thread Ming Lei
Hi Kashyap, On Wed, Feb 07, 2018 at 07:44:04PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Wednesday, February 7, 2018 5:53 PM > > To: Hannes Reinecke > > Cc: Kashyap Desai; Jens Axboe; linux-bl

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-07 Thread Ming Lei
On Wed, Feb 07, 2018 at 07:50:21AM +0100, Hannes Reinecke wrote: > Hi all, > > [ .. ] > >> > >> Could you share us your patch for enabling global_tags/MQ on > > megaraid_sas > >> so that I can reproduce your test? > >> > >>> See below perf top data. "bt_iter" is consuming 4 times more CPU. > >> >

Re: [PATCH V2 5/8] scsi: introduce force_blk_mq

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 12:20:43PM -0800, Omar Sandoval wrote: > On Mon, Feb 05, 2018 at 11:20:32PM +0800, Ming Lei wrote: ... > > shost->use_blk_mq = scsi_use_blk_mq; > > Not sure if this is a patch formatting issue, but this old line wasn't > deleted. Good cat

Re: [PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 04:18:20PM -0700, Jens Axboe wrote: > On 2/5/18 8:20 AM, Ming Lei wrote: ... > > GLOBAL implies that it's, strangely enough, global. That isn't really the > case. Why not call this BLK_MQ_F_HOST_TAGS or something like that? I'd > welcome better names, but

Re: [PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 12:33:36PM -0800, Omar Sandoval wrote: > On Mon, Feb 05, 2018 at 11:20:29PM +0800, Ming Lei wrote: .. > > > > + /* need to restart all hw queues for global tags */ > > + if (hctx->flags & BLK_MQ_F_GLOBAL_TAGS) { > > +

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Ming Lei
Hi Kashyap, On Tue, Feb 06, 2018 at 07:57:35PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Tuesday, February 6, 2018 6:02 PM > > To: Kashyap Desai > > Cc: Hannes Reinecke; Jens Axboe; linux-bl

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Ming Lei
Hi Kashyap, On Tue, Feb 06, 2018 at 04:59:51PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Ming Lei [mailto:ming@redhat.com] > > Sent: Tuesday, February 6, 2018 1:35 PM > > To: Kashyap Desai > > Cc: Hannes Reinecke; Jens Axboe; linux-bl

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-06 Thread Ming Lei
On Tue, Feb 06, 2018 at 09:39:26AM +0100, Hannes Reinecke wrote: > On 02/05/2018 04:20 PM, Ming Lei wrote: > > This patch uses .force_blk_mq to drive HPSA via SCSI_MQ, meantime maps > > each reply queue to blk_mq's hw queue, then .queuecommand can always > > choose the hw que

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-06 Thread Ming Lei
Hello chenxiang, On Tue, Feb 06, 2018 at 10:18:19AM +0800, chenxiang (M) wrote: > 在 2018/2/5 23:20, Ming Lei 写道: > > This patch uses .force_blk_mq to drive HPSA via SCSI_MQ, meantime maps > > each reply queue to blk_mq's hw queue, then .queuecommand can always > > choose the

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Ming Lei
Hi Kashyap, On Tue, Feb 06, 2018 at 11:33:50AM +0530, Kashyap Desai wrote: > > > We still have more than one reply queue ending up completion one CPU. > > > > pci_alloc_irq_vectors(PCI_IRQ_AFFINITY) has to be used, that means > > smp_affinity_enable has to be set as 1, but seems it is the default

[PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-05 Thread Ming Lei
Christoph Hellwig <h...@lst.de>, Cc: Don Brace <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Tested-by: Laurenc

[PATCH V2 7/8] scsi: hpsa: call hpsa_hba_inquiry() after adding host

2018-02-05 Thread Ming Lei
: Mike Snitzer <snit...@redhat.com> Tested-by: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/hpsa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 287e5eb07

[PATCH V2 6/8] scsi: virtio_scsi: fix IO hang by irq vector automatic affinity

2018-02-05 Thread Ming Lei
inecke <h...@suse.de> Tested-by: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/virtio_scsi.c | 59 +++--- 1 file changed, 3 insertions(+), 56 deletions(-) diff --git a/drivers

[PATCH V2 5/8] scsi: introduce force_blk_mq

2018-02-05 Thread Ming Lei
: Hannes Reinecke <h...@suse.de> Tested-by: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/hosts.c | 1 + include/scsi/scsi_host.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c

[PATCH V2 4/8] block: null_blk: introduce module parameter of 'g_global_tags'

2018-02-05 Thread Ming Lei
t;h...@lst.de>, Cc: Don Brace <don.br...@microsemi.com> Cc: Kashyap Desai <kashyap.de...@broadcom.com> Cc: Peter Rivera <peter.riv...@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Tested-by: Laurence Oberman <lober...@redhat.com> Reviewed-by: Hannes Reinecke <h...@

[PATCH V2 3/8] scsi: Add template flag 'host_tagset'

2018-02-05 Thread Ming Lei
com> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Tested-by: Laurence Oberman <lober...@redhat.com> Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/scsi_lib.c | 2 ++ include/scsi/s

[PATCH V2 2/8] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-05 Thread Ming Lei
..@broadcom.com> Cc: Mike Snitzer <snit...@redhat.com> Tested-by: Laurence Oberman <lober...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- block/blk-mq-debugfs.c | 1 + block/blk-mq-sched.c | 13 - block/blk-mq-tag.c | 23 +

[PATCH V2 1/8] blk-mq: tags: define several fields of tags as pointer

2018-02-05 Thread Ming Lei
t;snit...@redhat.com> Cc: Christoph Hellwig <h...@infradead.org> Signed-off-by: Ming Lei <ming@redhat.com> --- block/bfq-iosched.c| 4 ++-- block/blk-mq-debugfs.c | 10 +- block/blk-mq-tag.c | 48 ++-- block/blk-mq-ta

[PATCH V2 0/8] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-05 Thread Ming Lei
hang issue - add 'scsi: Add template flag 'host_tagset'' - reorder patch Thanks Ming Hannes Reinecke (1): scsi: Add template flag 'host_tagset' Ming Lei (7): blk-mq: tags: define several fields of tags as pointer blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS block: null_blk: intro

Re: [PATCH 2/5] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-05 Thread Ming Lei
On Mon, Feb 05, 2018 at 07:54:29AM +0100, Hannes Reinecke wrote: > On 02/03/2018 05:21 AM, Ming Lei wrote: > > Quite a few HBAs(such as HPSA, megaraid, mpt3sas, ..) support multiple > > reply queues, but tags is often HBA wide. > > > > These HBAs have switched t

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-05 Thread Ming Lei
On Mon, Feb 05, 2018 at 07:58:29AM +0100, Hannes Reinecke wrote: > On 02/03/2018 05:21 AM, Ming Lei wrote: > > Hi All, > > > > This patchset supports global tags which was started by Hannes originally: > > > > https://marc.info/?l=linux-block=1491325

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-05 Thread Ming Lei
Hi Kashyap, On Mon, Feb 05, 2018 at 12:35:13PM +0530, Kashyap Desai wrote: > > -Original Message- > > From: Hannes Reinecke [mailto:h...@suse.de] > > Sent: Monday, February 5, 2018 12:28 PM > > To: Ming Lei; Jens Axboe; linux-bl...@vger.kernel.org; Christoph H

[PATCH 5/5] scsi: virtio_scsi: fix IO hang by irq vector automatic affinity

2018-02-02 Thread Ming Lei
<lober...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/virtio_scsi.c | 59 +++--- 1 file changed, 3 insertions(+), 56 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c

[PATCH 4/5] scsi: introduce force_blk_mq

2018-02-02 Thread Ming Lei
<lober...@redhat.com> Cc: Mike Snitzer <snit...@redhat.com> Signed-off-by: Ming Lei <ming@redhat.com> --- drivers/scsi/hosts.c | 1 + include/scsi/scsi_host.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index fe

  1   2   3   4   5   6   >