From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 30 Jun 2018 09:12:19 +0800 From: Ming Lei To: Guenter Roeck Cc: linux-scsi@vger.kernel.org, Jens Axboe , linux-block@vger.kernel.org, Omar Sandoval , "Martin K. Petersen" , James Bottomley , Christoph Hellwig , Don Brace , Kashyap Desai , Mike Snitzer , Hannes Reinecke , Laurence Oberman , Bart Van Assche Subject: Re: [V2, 2/2] scsi: avoid to hold host-wide counter of host_busy for scsi_mq Message-ID: <20180630011213.GA12152@ming.t460p> References: <20180624140327.28146-3-ming.lei@redhat.com> <20180629162054.GA19036@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20180629162054.GA19036@roeck-us.net> Sender: linux-scsi-owner@vger.kernel.org List-ID: On Fri, Jun 29, 2018 at 09:20:54AM -0700, Guenter Roeck wrote: > Hi, > > On Sun, Jun 24, 2018 at 10:03:27PM +0800, Ming Lei wrote: > > It isn't necessary to check the host depth in scsi_queue_rq() any more > > since it has been respected by blk-mq before calling scsi_queue_rq() via > > getting driver tag. > > > > Lots of LUNs may attach to same host, and per-host IOPS may reach millions > > level, so we should avoid to this expensive atomic operations on the > > hostwide counter in IO path. > > > > This patch implemens scsi_host_busy() via blk_mq_tagset_busy_iter() for > > reading the count of busy IOs for scsi_mq. > > > > It is observed that IOPS is increased by 15% in IO test on scsi_debug > > (32 LUNs, 32 submit queues, 1024 can_queue, libaio/dio) in one > > dual-socket system. > > > > This patch breaks two of my qemu test builds in -next: parisc:defconfig > and arm:versatilepb-scsi:versatile_defconfig (which is versatilepb booting > from scsi disk). The symptom is the same for both: Boot stalls after scsi > bus initialization. > > arm: > > sym53c8xx 0000:00:0c.0: enabling device (0100 -> 0103) > sym0: <895a> rev 0x0 at pci 0000:00:0c.0 irq 66 > sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking > sym0: SCSI BUS has been reset. > scsi host0: sym-2.2.3 > random: fast init done > [stalls] > > parisc: > > sym53c8xx 0000:00:00.0: enabling SERR and PARITY (0107 -> 0147) > sym0: <895a> rev 0x0 at pci 0000:00:00.0 irq 17 > sym0: PA-RISC Firmware, ID 7, Fast-40, LVD, parity checking > sym0: SCSI BUS has been reset. > scsi host0: sym-2.2.3 > random: fast init done > [stalls] > > Reverting the patch fixes the problem. Bisect log is attached. Hi Guenter, Thanks for your test & report! This looks a bit weird, I need to take a close look given this patch supposes to be nop for non-blk-mq, which is exactly your case. Thanks, Ming