Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5458945rdb; Wed, 13 Dec 2023 09:10:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJln6l2naAKU6aaHc0bMRFuTHah8P50wrokAZkh33gbu6gGtufbpWr3li+oT5s0BicUd/Z X-Received: by 2002:a05:6a20:8e0e:b0:189:fd93:c969 with SMTP id y14-20020a056a208e0e00b00189fd93c969mr10158940pzj.26.1702487409730; Wed, 13 Dec 2023 09:10:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702487409; cv=pass; d=google.com; s=arc-20160816; b=HmwPM92TPGCaty5WqLGysQdRJkeBRpc5PJ/hfqFB5lZ+pK+mTGCeUyrb1wm1Rf8zNb TUpMuaKB7O+GJr63xDkss65SHtjPMHl9bk4W6AyN4vt8mzzMkBqWALN8KazWFe6n35+K tb4kKeM/gNfoxt0M/3wYYbwpuLyN7XF+ChsBX5QI6gEz+o4ecY3OVnwQAxhhXLfWh86r wtwHO8ackS/mx2VWAwQJGl8D8zaiXMvKi1DasfQPglLEjjB14eKXhOYEXnsqFqqKltuA aDTmwrgxCiCqxoWt69XhvlN8S9ZeWMf3ovbb8rM2kYgRSNyiv2Fno06X+E6fr6KX9Nq5 gPsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=i8DC1ob1638TzWEVmaIn6qn7ErtWP1ASwtF01jtziro=; fh=PBmJJLOCoBIBolQizYY3jf/+mKwOjxTNrwU1MLlT5Ok=; b=IuaDfsyWdjOQnAnC0bbYhvopM6esBgsRQex/pqc5TIGXZDQTOgFkH5akrUVtpCiW+O aG9f2/eWmXHuGTn6UogEM749MKFGeSjSWEwbi/mvFhirpusGY4cHynQTJI1eg1lpbwQC M23S8cHBe3clOjaJXj429vGETvMX5G0j1yXxiWkOmjl6G0lQOBCXCQTggfnQRLie0gz5 ppCv5eYZZBAWKAgg0hI4zT8UQLpkGMP6zPOAQHViOhwWlWK65ExQ6hSavOfBArZi8Z3P Q/nEZ81+PGfjad3fvPTu35fLd74BT4tSw55YQQKh1vf42z5YxFWOumwAguJIzwxe8/VP 6GRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=PLSjBY3g; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HC+up8GY; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id l5-20020a056a00140500b006cdf584699fsi9918890pfu.336.2023.12.13.09.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:10:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=PLSjBY3g; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HC+up8GY; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8A1ED80774B7; Wed, 13 Dec 2023 09:10:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233706AbjLMRJs (ORCPT + 99 others); Wed, 13 Dec 2023 12:09:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjLMRJq (ORCPT ); Wed, 13 Dec 2023 12:09:46 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05A43C9; Wed, 13 Dec 2023 09:09:51 -0800 (PST) Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDER28u023870; Wed, 13 Dec 2023 17:09:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-11-20; bh=i8DC1ob1638TzWEVmaIn6qn7ErtWP1ASwtF01jtziro=; b=PLSjBY3g0dLY2ye9az+XqKdwqE8YcoPz5Syb0/X4JBNMMCEB3PZqDXCzVNfwXAg6Q+3q mqnwAS+I9lMQTWVOcUCpRjPLN0Qh5lnZ5MAgfMbguzXXqygCGrTW04xLwy2p6z0+wXRD 00vFcdc3FJ4qIP9H6S5FZCy96fUfdL90ffKKd25zbG8tE2xJ69z4e7rmaJBcZCg71p5l C8Hs8uq5kfUvQLKxcNhTewQW7yhVJYPKCtq94g7coO9/YyqjcIIOwrKJgYBEEgJt4EQF xWO2RM2+MPya7GlzmVUBhXbCfrC+S0GD4YhxXvI+gIGuEAHF2eC1TSl3DCFuAGvkt5Fa wg== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uvf5c8sec-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2023 17:09:24 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3BDGx3cA003106; Wed, 13 Dec 2023 17:09:23 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uvep8mcpy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Dec 2023 17:09:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UgpCkOqtuZlxJKueZpcAwjNRXiK6lp+MBDrxrbVzgjV4z35IAltBClLiQ6pXkbhxpQRe3OKUmxq8vcBmJO3ZJkI6SIdXY1WQlfg2zPQzyJBe+w1bJObiOTELzssYOthAznGjUw3l6zX6ltsWf6SVTKqEWKhpFVthbMLexV5hAXAk2k1ToyXqjWhifQOy5tPQm6J6rTzlR4HFIHxryxarT/0tud6Mj1jR6aQzLWd3xFv38GTQ5u4yyubIEkR5mKbIyRQK6S0etzpLT1eALLFYImlElnOFHBOq1vgsROoEzAQS//C4TKDaJ4tT0AYjvBex9KgzQOTuHv0oFU8hDYi0jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i8DC1ob1638TzWEVmaIn6qn7ErtWP1ASwtF01jtziro=; b=aMjzba0qE9B8splPvbrB14GMVX5WHf3LEGtJVjg4aWp98t8oqru7M4h3uEmYNKLLSj6ygnGwN9CUZyikkLU5e241H9//3OYmLwYf0GUFw/mQzYQlxaf+46FN7yGrGGtNuI5PwyMl0kLDIji6/DDU4VOx95nRh3Q9DGlu6l+yfBh//vxmz1tac6NJCallMZ0VSQYef1tHYemYCp0xPgodxfGGeI0zQS+U57wiNpout2KZ2MukxjLFyQ11fkCLJnWRg7kyDkxkl3IQ8A4CiF8XKXSmIkYPO7CpkzRO04CrvseECPLHCTwY+wjwvlmL/EREgL4V2Yl6iRaXpsQwA0Eluw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i8DC1ob1638TzWEVmaIn6qn7ErtWP1ASwtF01jtziro=; b=HC+up8GYQ6/whGSpwjB26QLJxMQNmZSvD9Zxn2k0CCYeKxWEvAGQ7EmWosFX+rkBq/ekNmfXvP7HUWvZBNd/4+l7RhSe7CbiFRcBVx+AiKSk6fV46M6IXmaZFUvXndS+9qxdUdUklKoZx50oEzFceG1HSdo8MpyPz8fqGew6aVg= Received: from BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) by SJ0PR10MB5567.namprd10.prod.outlook.com (2603:10b6:a03:3dd::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Wed, 13 Dec 2023 17:09:19 +0000 Received: from BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::dec8:8ef8:62b0:7777]) by BYAPR10MB2663.namprd10.prod.outlook.com ([fe80::dec8:8ef8:62b0:7777%4]) with mapi id 15.20.7091.022; Wed, 13 Dec 2023 17:09:19 +0000 Message-ID: Date: Wed, 13 Dec 2023 09:09:18 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [RFC 2/2] PCI: acpiphp: slowdown hotplug if hotplugging multiple devices at a time To: "Michael S. Tsirkin" , Igor Mammedov Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pci@vger.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 References: <20231213003614.1648343-1-imammedo@redhat.com> <20231213003614.1648343-3-imammedo@redhat.com> <20231213115248-mutt-send-email-mst@kernel.org> Content-Language: en-US From: Dongli Zhang In-Reply-To: <20231213115248-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR03CA0282.namprd03.prod.outlook.com (2603:10b6:a03:39e::17) To BYAPR10MB2663.namprd10.prod.outlook.com (2603:10b6:a02:a9::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB2663:EE_|SJ0PR10MB5567:EE_ X-MS-Office365-Filtering-Correlation-Id: 834d3ab4-21d6-4a9a-53f5-08dbfbfe3e63 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mpRZZMKKMS9z6Zh09fMvzlSC/GcRIGFSj52fyZpoIYZ+J34X9VSi2M9xwPt2dZc0rmHpy/2B+FZlGFp/XunST1vwk/rxmtNdXrraSfy5dxzkarFHSXl3dJqEgkm8XwdmIiExf6KWkxkbv5uy5Md5SrII2Sa8GR+DppOkFS2p6QtsJ1s/FFyfDRkF+Tg/4x6JCp9BLrYPHCWvntgqBN2X+EhS6eB98J+OJvRFfBhvZO7sQbWhg5AM+4Ys2oikHsUv+MXum6vbY8cdJprMAUPjxwFCLHyxkonZIiY/qyMmYMfUlmn10iiPLRZVDzNcoY5WKydSsSCTIg3Ern2XH6u8H4ERR/cU28xra8Ox02TI+tgA+6OFoS1vgI+9rkEco4ohXDk8Kiaf6mYn4XtCn3eHp5joixVdKSh5TsT9pAdsLjTE7DF3+7yUhstovfib+xBpQbjfkCj4PI7iF18Lc7HFeOyo4CFQyVXH07WfH2dG9/MzVVOL+niF5GN0a47ez9lvS+y8D/rjZ7ASEKYJexID3TZrssUTDctgu0wyQyMBhH74Mn23hmkYcLZX6QW2C4qGH4TVdurYtoQ1jhIDOwpTtyrFW2/IPlIP5SX7Modp6ELM+bQKtm89eZWx1/s4CWpa2jOUXCiowE2y9ZRasZ/y3A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB2663.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(396003)(39860400002)(376002)(366004)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(26005)(6512007)(2616005)(6506007)(86362001)(38100700002)(31686004)(66476007)(44832011)(66946007)(54906003)(66556008)(316002)(110136005)(478600001)(6486002)(966005)(53546011)(83380400001)(8936002)(8676002)(4326008)(31696002)(7416002)(2906002)(36756003)(41300700001)(5660300002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NGhPY0VscWVZOGl2WmNhVWwvNVZmVDRsdkZjV1ZiRSt1SW1FQlViMUxoZ3ZO?= =?utf-8?B?NCs2Q2Nld3A3THhiZkNrZ0FMaTVkRlV3SytiOXE4T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-8?B?ZTJTMG9YSWlTQXJkR3dpUTgwSW9FSmRBQ21odWJwREFGSGYrN0ZZS3BtMmFz?= =?utf-8?B?R3NHL1BhenVkY1pxTFdWU1lNengyL2QycWdIeWtiUVVRZnpMTncreHNDRXp5?= =?utf-8?B?UEVTMjdZSFRlSnZtWWVQT3NRN2doZ21rTThIQnEwZ2NNOXpwUHhRN09sVG9Z?= =?utf-8?B?b1J3UUhYNHI3blZtZ09QdFVBbjJnem9xRWQrZFlyYkh4Z3RHQWJQbDloWWpk?= =?utf-8?Q?1JRQNaHxXpDW0gnSzQemzGXFU?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 5IGZmkYWXbVDhJqPsnVBMy+4xnkV1rwjpMU6Ja1lyIKX8sJ4jobgV/2Yi5h9h+SBy8I2r17UZsi/q9DsaCcA3W2yMSdB/3ZVv4iWtFOiWsVNBqWsSlW3kZo3b36oWRmpUrrNXVGatn1sGkZ2r/FeV/oUSDhwDmpVYDrrNpKSNpUuJhQuAi7v8jWsY/m75iHZGcbaOd5NHLjtxdjiC0uBINgOs9MEWRqvLWnb/2u66KJ7whvPGi8w27QUtcq6edqiTZEILbotsFPTzm/3OQLBMOvRgjK21DF4Z24GtQSjO+u6h1vLKDQqgK67d76pwf/C0HwKhO9rY4UbQPyma/dGuL5yF0nFk9swpBnmTEHJrWS9I8H5Jit3bxYdQjTr2d2DjSA+ntfjItqwVl53vgb0/PEURfGrTuYEa7FRCwn/W1XvDvzMqcOxPSu3lBv6vb4UATuOCy0aNz3xOlwXFUBDHfL6lmLFieYbGpnQHEv2mdbt7HtOQZqv6vs+hQSM1NYU8QGg1X/9ZitiGfhG1TwYIshHhL32BzYgwubrUTnlfgWfxoS1VISERXtt7kYhvsScbHAWYFNe4qsS5nQYpQ3Yla0i+mJpz7toQeeLcRNbImQ= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 834d3ab4-21d6-4a9a-53f5-08dbfbfe3e63 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB2663.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2023 17:09:19.1632 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lXJhCI9GWBTbNPatw8PBvU1e1gvMhnpokZL0N/qTpb6pXXtToBAafsE3c8iJZ7kbBQ2by2Z3o5gKzOoLvXdVYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5567 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-13_10,2023-12-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312130122 X-Proofpoint-ORIG-GUID: txVwy_g0EtAzh7ZMwg-QBnFmc7OYX3eh X-Proofpoint-GUID: txVwy_g0EtAzh7ZMwg-QBnFmc7OYX3eh X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:10:06 -0800 (PST) Hi Igor, On 12/13/23 08:54, Michael S. Tsirkin wrote: > On Wed, Dec 13, 2023 at 05:49:39PM +0100, Igor Mammedov wrote: >> On Wed, Dec 13, 2023 at 2:08 PM Rafael J. Wysocki wrote: >>> >>> On Wed, Dec 13, 2023 at 1:36 AM Igor Mammedov wrote: >>>> >>>> previous commit ("PCI: acpiphp: enable slot only if it hasn't been enabled already" >>>> introduced a workaround to avoid a race between SCSI_SCAN_ASYNC job and >>>> bridge reconfiguration in case of single HBA hotplug. >>>> However in virt environment it's possible to pause machine hotplug several >>>> HBAs and let machine run. That can hit the same race when 2nd hotplugged >>>> HBA will start re-configuring bridge. >>>> Do the same thing as SHPC and throttle down hotplug of 2nd and up >>>> devices within single hotplug event. >>>> >>>> Signed-off-by: Igor Mammedov >>>> --- >>>> drivers/pci/hotplug/acpiphp_glue.c | 6 ++++++ >>>> 1 file changed, 6 insertions(+) >>>> >>>> diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c >>>> index 6b11609927d6..30bca2086b24 100644 >>>> --- a/drivers/pci/hotplug/acpiphp_glue.c >>>> +++ b/drivers/pci/hotplug/acpiphp_glue.c >>>> @@ -37,6 +37,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>>> >>>> #include "../pci.h" >>>> #include "acpiphp.h" >>>> @@ -700,6 +701,7 @@ static void trim_stale_devices(struct pci_dev *dev) >>>> static void acpiphp_check_bridge(struct acpiphp_bridge *bridge) >>>> { >>>> struct acpiphp_slot *slot; >>>> + int nr_hp_slots = 0; >>>> >>>> /* Bail out if the bridge is going away. */ >>>> if (bridge->is_going_away) >>>> @@ -723,6 +725,10 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge) >>>> >>>> /* configure all functions */ >>>> if (slot->flags != SLOT_ENABLED) { >>>> + if (nr_hp_slots) >>>> + msleep(1000); >>> >>> Why is 1000 considered the most suitable number here? Any chance to >>> define a symbol for it? >> >> Timeout was borrowed from SHPC hotplug workflow where it apparently >> makes race harder to reproduce. >> (though it's not excuse to add more timeouts elsewhere) >> >>> And won't this affect the cases when the race in question is not a concern? >> >> In practice it's not likely, since even in virt scenario hypervisor won't >> stop VM to hotplug device (which beats whole purpose of hotplug). >> >> But in case of a very slow VM (overcommit case) it's possible for >> several HBA's to be hotplugged by the time acpiphp gets a chance >> to handle the 1st hotplug event. SHPC is more or less 'safe' with its >> 1sec delay. >> >>> Also, adding arbitrary timeouts is not the most robust way of >>> addressing race conditions IMV. Wouldn't it be better to add some >>> proper synchronization between the pieces of code that can race with >>> each other? >> >> I don't like it either, it's a stop gap measure to hide regression on >> short notice, >> which I can fixup without much risk in short time left, before folks >> leave on holidays. >> It's fine to drop the patch as chances of this happening are small. >> [1/2] should cover reported cases. >> >> Since it's RFC, I basically ask for opinions on a proper way to fix >> SCSI_ASYNC_SCAN >> running wild while the hotplug is in progress (and maybe SCSI is not >> the only user that >> schedules async job from device probe). > > Of course not. And things don't have to be scheduled from probe right? > Can be triggered by an interrupt or userspace activity. I agree with Michael. TBH, I am curious if the two patches can workaround/resolve the issue. Would you mind helping explain if to run enable_slot() for a new PCI device can impact the other PCI devices existing on the bridge? E.g.,: 1. Attach several virtio-scsi or virtio-net on the same bridge. 2. Trigger workload for those PCI devices. They may do mmio write to kick the doorbell (to trigger KVM/QEMU ioeventfd) very frequently. 3. Now hot-add an extra PCI device. Since the slot is never enabled, it enables the slot via enable_slot(). Can I assume the last enable_slot() will temporarily re-configure the bridge window so that all other PCI devices' mmio will lose effect at that time point? Since drivers always kick the doorbell conditionally, they may hang forever. As I have reported, we used to have the similar issue. PCI: Probe bridge window attributes once at enumeration-time https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=51c48b310183ab6ba5419edfc6a8de889cc04521 Therefore, can I assume the issue is not because to re-enable an already-enabled slot, but to touch the bridge window for more than once? Thank you very much! Dongli Zhang > >> So adding synchronisation and testing >> would take time (not something I'd do this late in the cycle). >> >> So far I'm thinking about adding rw mutex to bridge with the PCI >> hotplug subsystem >> being a writer while scsi scan jobs would be readers and wait till hotplug code >> says it's safe to proceed. >> I plan to work in this direction and give it some testing, unless >> someone has a better idea. > >>> >>>> + >>>> + ++nr_hp_slots; >>>> enable_slot(slot, true); >>>> } >>>> } else { >>>> -- >>> >