lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 Oct 2021 16:08:42 +0000
From:   Michael Kelley <mikelley@...rosoft.com>
To:     John Garry <john.garry@...wei.com>,
        Dexuan Cui <decui@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "ming.lei@...hat.com" <ming.lei@...hat.com>,
        "bvanassche@....org" <bvanassche@....org>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH] scsi: storvsc: Cap scsi_driver.can_queue to fix a hang
 issue during boot

From: John Garry <john.garry@...wei.com> Sent: Wednesday, October 6, 2021 9:03 AM
> 
> On 06/10/2021 16:01, Michael Kelley wrote:
> > From: John Garry <john.garry@...wei.com> Sent: Wednesday, October 6, 2021 1:17 AM
> >>
> >> On 06/10/2021 08:03, Dexuan Cui wrote:
> >>> After commit ea2f0f77538c, a 416-CPU VM running on Hyper-V hangs during
> >>> boot because scsi_add_host_with_dma() sets shost->cmd_per_lun to a
> >>> negative number:
> >>> 	'max_outstanding_req_per_channel' is 352,
> >>> 	'max_sub_channels' is (416 - 1) / 4 = 103, so in storvsc_probe(),
> >>> scsi_driver.can_queue = 352 * (103 + 1) * (100 - 10) / 100 = 32947, which
> >>> is bigger than SHRT_MAX (i.e. 32767).
> >>
> >> Out of curiosity, are these values realistic? You're capping can_queue
> >> just because of a data size issue, so, if these values are realistic,
> >> seems a weak reason.
> >>
> >
> > The calculated value of can_queue is not realistic.  The blk-mq layer
> > caps the number of tags at 10240,
> 
> nit: 1024, I think

I was thinking about BLK_MQ_MAX_DEPTH (#define'd as 10240), which
is used to limit the tag set size in blk_mq_alloc_tag_set().   When running
on large VMs on Hyper-V, we can see the "blk-mq: reduced tag depth
to 10240" message. :-(

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ