From patchwork Fri Apr 22 12:16:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurence Oberman X-Patchwork-Id: 8911471 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D38109F54E for ; Fri, 22 Apr 2016 12:17:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C833220221 for ; Fri, 22 Apr 2016 12:17:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B1D4020220 for ; Fri, 22 Apr 2016 12:17:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752669AbcDVMQ4 (ORCPT ); Fri, 22 Apr 2016 08:16:56 -0400 Received: from mx6-phx2.redhat.com ([209.132.183.39]:43297 "EHLO mx6-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbcDVMQy (ORCPT ); Fri, 22 Apr 2016 08:16:54 -0400 Received: from zmail22.collab.prod.int.phx2.redhat.com (zmail22.collab.prod.int.phx2.redhat.com [10.5.83.26]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3MCGiCR041566; Fri, 22 Apr 2016 08:16:44 -0400 Date: Fri, 22 Apr 2016 08:16:44 -0400 (EDT) From: Laurence Oberman To: Johannes Thumshirn Cc: "Martin K . Petersen" , "James E . J . Bottomley" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Laura Abbott , Michael Reed , stable@vger.kernel.org Message-ID: <668592243.31153125.1461327404017.JavaMail.zimbra@redhat.com> In-Reply-To: <1461310270-8945-1-git-send-email-jthumshirn@suse.de> References: <1461310270-8945-1-git-send-email-jthumshirn@suse.de> Subject: Re: [PATCH] qla1280: Reduce can_queue to 32 MIME-Version: 1.0 X-Originating-IP: [10.12.214.10] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF38 (Linux)/8.0.6_GA_5922) Thread-Topic: qla1280: Reduce can_queue to 32 Thread-Index: pCNe/zVfmyB7X16Sl4VOmGx4iasyfw== Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The change looks fine, I see its hard-coded to 32 in qla1280_set_defaults() Would it be better to create a #define like other drivers and use that in both. Also did the below patch resolve this for the bug reporter. I ask because if I check 4.3 it was also set to the same value of 0xfffff and that is reported as working. So other changes in 4.4 must be "abusing" this high value. Reviewed-by Laurence Oberman Laurence Oberman Principal Software Maintenance Engineer Red Hat Global Support Services ----- Original Message ----- From: "Johannes Thumshirn" To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, "Johannes Thumshirn" , "Laura Abbott" , "Michael Reed" , stable@vger.kernel.org Sent: Friday, April 22, 2016 3:31:10 AM Subject: [PATCH] qla1280: Reduce can_queue to 32 It was reported in https://bugzilla.redhat.com/show_bug.cgi?id=1321033, that the qla1280 driver sets the scsi_host_template's can_queue field to 0xfffff which results in an allocation failure when allocating the block layer tags for the driver's queues like the one shown below: [ 4.804166] scsi host0: QLogic QLA1040 PCI to SCSI Host Adapter Firmware version: 7.65.06, Driver version 3.27.1 [ 4.804174] ------------[ cut here ]------------ [ 4.804184] WARNING: CPU: 2 PID: 305 at mm/page_alloc.c:2989 alloc_pages_nodemask+0xae8/0xbc0() [ 4.804186] Modules linked in: amdkfd amd_iommu_v2 radeon i2c_algo_bit m_kms_helper ttm drm megaraid_sas serio_raw 8021q garp bnx2 stp llc mrp nhme qla1280(+) fjes [ 4.804208] CPU: 2 PID: 305 Comm: systemd-udevd Not tainted 4.6-201.fc22.x86_64 #1 [ 4.804210] Hardware name: Google Enterprise Search Appliance/0DT021, OS 1.1.2 08/14/2006 [ 4.804212] 0000000000000286 000000002f01064c ffff88042985b710 ffffff813b542e [ 4.804216] 0000000000000000 ffffffff81a75024 ffff88042985b748 ffffff810a40f2 [ 4.804220] 0000000000000000 0000000000000000 000000000000000b 00000000000000 [ 4.804223] Call Trace: [ 4.804231] [] dump_stack+0x63/0x85 [ 4.804236] [] warn_slowpath_common+0x82/0xc0 [ 4.804239] [] warn_slowpath_null+0x1a/0x20 [ 4.804242] [] __alloc_pages_nodemask+0xae8/0xbc0 [ 4.804247] [] ? _raw_spin_unlock_irqrestore+0xe/0x10 [ 4.804251] [] ? irq_work_queue+0x8e/0xa0 [ 4.804256] [] ? console_unlock+0x20a/0x540 [ 4.804262] [] alloc_pages_current+0x8c/0x110 [ 4.804265] [] alloc_kmem_pages+0x19/0x90 [ 4.804268] [] kmalloc_order_trace+0x2e/0xe0 [ 4.804272] [] __kmalloc+0x232/0x260 [ 4.804277] [] init_tag_map+0x3d/0xc0 [ 4.804290] [] __blk_queue_init_tags+0x45/0x80 [ 4.804293] [] blk_init_tags+0x14/0x20 [ 4.804298] [] scsi_add_host_with_dma+0x80/0x300 [ 4.804305] [] qla1280_probe_one+0x683/0x9ef [qla1280] [ 4.804309] [] local_pci_probe+0x45/0xa0 [ 4.804312] [] pci_device_probe+0xfd/0x140 [ 4.804316] [] driver_probe_device+0x222/0x490 [ 4.804319] [] __driver_attach+0x84/0x90 [ 4.804321] [] ? driver_probe_device+0x490/0x490 [ 4.804324] [] bus_for_each_dev+0x6c/0xc0 [ 4.804326] [] driver_attach+0x1e/0x20 [ 4.804328] [] bus_add_driver+0x1eb/0x280 [ 4.804331] [] ? 0xffffffffa0015000 [ 4.804333] [] driver_register+0x60/0xe0 [ 4.804336] [] __pci_register_driver+0x4c/0x50 [ 4.804339] [] qla1280_init+0x1ce/0x1000 [qla1280] [ 4.804341] [] ? 0xffffffffa0015000 [ 4.804345] [] do_one_initcall+0xb3/0x200 [ 4.804348] [] ? kmem_cache_alloc_trace+0x196/0x210 [ 4.804352] [] ? do_init_module+0x27/0x1cb [ 4.804354] [] do_init_module+0x5f/0x1cb [ 4.804358] [] load_module+0x2040/0x2680 [ 4.804360] [] ? __symbol_put+0x60/0x60 [ 4.804363] [] SYSC_init_module+0x149/0x190 [ 4.804366] [] SyS_init_module+0xe/0x10 [ 4.804369] [] entry_SYSCALL_64_fastpath+0x12/0x71 [ 4.804371] ---[ end trace 0ea3b625f86705f7 ]--- [ 4.804581] qla1280: probe of 0000:11:04.0 failed with error -12 In qla1280_set_defaults() the maximum queue depth is set to 32 so adopt the scsi_host_template to it as well. Signed-off-by: Johannes Thumshirn Cc: Laura Abbott Cc: Michael Reed Cc: stable@vger.kernel.org --- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 5d0ec42..6bd748e 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -4214,7 +4214,7 @@ static struct scsi_host_template qla1280_driver_template = { .eh_bus_reset_handler = qla1280_eh_bus_reset, .eh_host_reset_handler = qla1280_eh_adapter_reset, .bios_param = qla1280_biosparam, - .can_queue = 0xfffff, + .can_queue = 32, .this_id = -1, .sg_tablesize = SG_ALL, .use_clustering = ENABLE_CLUSTERING,