Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5496358rdb; Wed, 13 Dec 2023 10:11:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IENn003GH2IPazro1fMplgq9aYuRsNk0R3P6oCwT310G0JWHtRY56pign0OCFmV2taSTE6y X-Received: by 2002:a05:6a00:93a5:b0:6ce:5e79:7ca1 with SMTP id ka37-20020a056a0093a500b006ce5e797ca1mr9217413pfb.23.1702491094211; Wed, 13 Dec 2023 10:11:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702491094; cv=none; d=google.com; s=arc-20160816; b=SZeOBjusmVzjqis3EJrHXX5d4piSOFZS9YEZkNEglvV/LgZSSgL5SwiMU2UJcWklyg 5XkKWGwewHTzwejg8p06EzoOs519vk3g8KwM6cEIWI1sKFMTMzYXczbqRbOq2AqQy35c 9rb6hZJ3obyjs7kADwNjYXB2/M5Jj440b6PULu/rtgZvRrsBCr6/um8BZXOh4KdFMZqY GaRSLc/M+KDhhb3kIGyDvwDgBJQF3M+UhYE4FtlLcpml2TTkEgOSReUVJGNWgp5mF41u ge8ONEu9s8Aa2yoXEGR4pcs7RMfUl2PBWjR+O0Ago1jsES29F3LRBsxkv7qoXxrIWcFs vrWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=uddhQ0OIRMORaVBeK8mcxdGc28+FRR376Lb4+AQLVOU=; fh=1qeGCfbWZV4N2xAlIkWNCbq/syzsYiOV8r94u6dtrj4=; b=Lp8lssSUeJsbuTvNR2qpY3Fml3l1Z3xruGdkMt+UKya80XwAhfIdrX2lggVGJykkBJ H3RtVyFLiJLj/6U2s04RWHc2WDgvblPMn5lImbfQ5OvdEy2oPVEl8G9PsVh+WMGNuRvb xQq8gtK0gVrx83VltpDK9vPUq0MaXj555/Hek+ybpjy2nFvncE6DJs/nPxjB65RtBfMK lkmXoySxw4zWwKcVJCL0K5Ga+g/wd8XqnXjeC5RxeKpKuxLD2L35W/Hrhr1875PyKVwt nqgO66noTdvtc/1pqKvukAmO9YLXyz6sZf5tr2+CAjg3ueCPGi7MEhi9kP7xTMCHSYBa ULFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FX7QEjno; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bs64-20020a632843000000b00563de199314si9980428pgb.896.2023.12.13.10.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FX7QEjno; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AA83E8092D97; Wed, 13 Dec 2023 10:11:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379350AbjLMSLM (ORCPT + 99 others); Wed, 13 Dec 2023 13:11:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378965AbjLMSLK (ORCPT ); Wed, 13 Dec 2023 13:11:10 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4461BA7 for ; Wed, 13 Dec 2023 10:11:17 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AAD9C433C8; Wed, 13 Dec 2023 18:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702491076; bh=DSiErSlPeiuZHKb7NJWMA2u0Y0HWFXxL9sLwA8/tUYA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FX7QEjnoKh72ueYdqD74yg05wXYTxMVUztUw7TdfxupRtYLKoHIGYJsP11rYCTQTo uouhlxVXtBC887SAwVBb2yYOQa7RH4MrEYgKX87qK4bOiWqPPkpxqFjPcU601TN7hL 3Y0w4pGKpX4nIhjLB0nfK2THpQRnnGuPmwgLix/TXa+9n+BK9+hlXUHWdpyFI4Io3g BuXr8NgPUAxhJZrmzByMoXBeHYq8iJHblN+8jdDxw66md/V3s8P2fCj3+F1CPH3oNl 77uySKk2deCI6nau+9Rd9hSX6X6qf/SM7mcEvXTGHk0J0gEcAG6wcmkdS55T54Eti7 3ObQIm+NmM4Bw== Date: Wed, 13 Dec 2023 12:11:15 -0600 From: Bjorn Helgaas To: Igor Mammedov Cc: linux-kernel@vger.kernel.org, Dongli Zhang , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, mst@redhat.com, rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com, mika.westerberg@linux.intel.com, boris.ostrovsky@oracle.com, joe.jin@oracle.com, stable@vger.kernel.org, Fiona Ebner , Thomas Lamprecht Subject: Re: [RFC 0/2] PCI: acpiphp: workaround race between hotplug and SCSI_SCAN_ASYNC job Message-ID: <20231213181115.GA1050010@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213003614.1648343-1-imammedo@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 10:11:23 -0800 (PST) On Wed, Dec 13, 2023 at 01:36:12AM +0100, Igor Mammedov wrote: > Hacks to mask a race between HBA scan job and bridge re-configuration(s) > during hotplug. > > I don't like it a bit but it something that could be done quickly > and solves problems that were reported. I agree, I don't like it either. Adding a 1s delay doesn't address the real problem, and putting in a band-aid like this means the real problem would likely never be addressed. At this point the best option I see is to revert these: cc22522fd55e2 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus") 40613da52b13f ("PCI: acpiphp: Reassign resources on bridge if necessary") I hate the fact that reverting them would mean the root bus hotplug and ACPI bus check notifications would become issues again. But keeping these commits even though they add a new different problem that breaks things for somebody else seems worse to me. Bjorn > Other options to discuss/possibly more invasive: > 1: make sure pci_assign_unassigned_bridge_resources() doesn't reconfigure > bridge if it's not necessary. > 2. make SCSI_SCAN_ASYNC job wait till hotplug is finished for all slots on > the bridge or somehow restart the job if it fails > 3. any other ideas? > > > 1st reported: https://lore.kernel.org/r/9eb669c0-d8f2-431d-a700-6da13053ae54@proxmox.com > > CC: Dongli Zhang > CC: linux-acpi@vger.kernel.org > CC: linux-pci@vger.kernel.org > CC: imammedo@redhat.com > CC: mst@redhat.com > CC: rafael@kernel.org > CC: lenb@kernel.org > CC: bhelgaas@google.com > CC: mika.westerberg@linux.intel.com > CC: boris.ostrovsky@oracle.com > CC: joe.jin@oracle.com > CC: stable@vger.kernel.org > CC: linux-kernel@vger.kernel.org > CC: Fiona Ebner > CC: Thomas Lamprecht > > Igor Mammedov (2): > PCI: acpiphp: enable slot only if it hasn't been enabled already > PCI: acpiphp: slowdown hotplug if hotplugging multiple devices at a > time > > drivers/pci/hotplug/acpiphp_glue.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > -- > 2.39.3 >