RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1659146 - Allow drivers to set .force_blk_mq in scsi_host_template to enable per-driver SCSI-MQ usage
Summary: Allow drivers to set .force_blk_mq in scsi_host_template to enable per-driver...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: pre-dev-freeze
: 7.7
Assignee: Ewan D. Milne
QA Contact: guazhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-13 16:55 UTC by Ewan D. Milne
Modified: 2021-09-06 12:47 UTC (History)
8 users (show)

Fixed In Version: kernel-3.10.0-1017.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:24:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2029 0 None None None 2019-08-06 12:24:43 UTC

Description Ewan D. Milne 2018-12-13 16:55:39 UTC
Description of problem:

SCSI drivers that no longer want to support the legacy request path in RHEL7,
or want to force the usage of SCSI-MQ regardless of the global scsi_mod.use_blk_mq
setting need a way to specify in the host template that SCSI-MQ must be used.

Version-Release number of selected component (if applicable): 7.7

Upstream has added a way to specify this:

Author: Ming Lei <ming.lei>
Date:   Tue Mar 13 17:42:41 2018 +0800

    scsi: core: introduce force_blk_mq

Comment 2 Ewan D. Milne 2018-12-13 16:56:41 UTC
Patch is predecessor to changes that will be made to storsvc driver in 7.7

Comment 4 guazhang@redhat.com 2019-01-14 00:13:53 UTC
Hello

How to test it? just add the  scsi_mod.use_blk_mq to host?

Comment 5 Ming Lei 2019-01-14 01:49:36 UTC
We may not need this patch for RHEL7, which is only for addressing virito-scsi's issue wrt. queue mapping vs. CPU hotplug.

However, there isn't such issue on RHEL7 because of the queue mapping/CPU hotplug handling difference.

Comment 6 Ewan D. Milne 2019-01-14 13:19:14 UTC
We will need it for the storvsc driver update in RHEL7.

Comment 7 Ewan D. Milne 2019-01-14 13:43:06 UTC
(In reply to guazhang from comment #4)
> Hello
> 
> How to test it? just add the  scsi_mod.use_blk_mq to host?

Yes.  With the exception of drivers that individually set
use_blk_mq, verify the following:

Boot with scsi_mod.use_blk_mq=N (the default case in RHEL7)
  find /sys | fgrep use_blk_mq (to find the sysfs nodes for the individual
                                scsi_host object settings for instantiated
                                hosts, they should be "0" unless a driver
                                has enabled it explicitly)

Boot with scsi_mod.use_blk_mq=Y
  find /sys | fgrep use_blk_mq -- sysfs nodes for scsi_host objects should be "1"

(i.e. verify that this change does not force SCSI-MQ "on" or "off" unintentionally
for all drivers.)

The actual logic in question that is being changed is in scsi_host_alloc()

-       shost->use_blk_mq = scsi_use_blk_mq && !shost->hostt->disable_blk_mq;
+       shost->use_blk_mq = (scsi_use_blk_mq || shost->hostt->force_blk_mq)
+                           && !shost->hostt->disable_blk_mq;

Drivers can change shost->use_blk_mq after the alloc but before they add the object,
these are the drivers that set use_blk_mq individual by their own module parameters.
(We did this with some drivers earlier in RHEL7 that wished to use SCSI-MQ but we
did not want to turn on SCSI-MQ for all SCSI drivers that might be in use in the kernel.)

Drivers that set use_blk_mq individually are:
  - Infiniband IB/srp -- default module parameter "use_blk_mq" is "Y"
  - lpfc driver - default module parameter "use_blk_mq" is "0"
  - qla2xxx driver - default module parameter "ql2xmqsupport" is "0"

---

The reason for this change now is that storvsc will not be running in non-MQ mode,
and therefore does not need a module option, it can just set the bit in the host
template.

Once the storvsc driver has been updated in RHEL7 to make use of this
functionality to set .force_blk_mq = 1 in the scsi_host_template, it
should always report "use_blk_mq" in the scsi_host object in sysfs
regardless of the scsi_mod.use_blk_mq setting.

Comment 8 Bruno Meneguele 2019-03-08 20:48:35 UTC
Patch(es) committed on kernel-3.10.0-1017.el7

Comment 11 guazhang@redhat.com 2019-05-08 07:32:03 UTC
Hello

RHEL7.7 mq regression test passed. so move to verified.

thanks
guazhang

Comment 13 errata-xmlrpc 2019-08-06 12:24:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:2029


Note You need to log in before you can comment on or make changes to this bug.