Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3295112lfo; Mon, 23 May 2022 00:58:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBkdjlI62r8xmw958TIRsKJYHvDwVgJqxWYPhTWBZIHHQz11iMwvtxut0TdROkTE6jbr9w X-Received: by 2002:a05:6a00:26d6:b0:518:358f:af0f with SMTP id p22-20020a056a0026d600b00518358faf0fmr22532122pfw.69.1653292683106; Mon, 23 May 2022 00:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653292683; cv=none; d=google.com; s=arc-20160816; b=knLb8wGJ5YH3KeHvhwcfJRQUiN1mR8goiBc7eFAhgCNnV6OXMBNd0pVKNNmo0p0bj9 Qwe7HSsKgtjlZB2538ofPhwlOFpiFYSHTESupGOqX4e8FuIrFzJ8jrZqoHQ4lTdxZeeC WzSAhg/i5fWn/Z0aDw008CLpcloyUoJSHrx463a6+uh82BsLZTIKtn2Yjt/h/bd/EVH7 Vlh2FPALyTLaK/svapkoEgv0X/ucByIhtVKpWdwfmYPS+yswjTmYurFyPrkikeoFrGty z0pawgUBzvwxyMGgt6yHtdSUsDJtxv/tgTVDEXEyRcN25h5t/SINXc6VO82gb+Eh+M+j ShoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Uv4f/1NF8vJN913Mqy+j9xmSvEO0/YL80ZweGtH9YZ0=; b=kHrEsu/WZ0aUe1nTa81gSz9/tygXDda4dYKpLGXTveEJ8mHnrBhSUG5ccMWamqRuaA BF7HRTS6qCpq/nOCyWiU0Oyti3qxULOyYR9j+7a1+AupxNjec3K9DYveger9znwgg5vi 4nWpyLQgEOBCHVBgElqPWZVZb2Nu5z2RcIJNGLtn9R6oec48T3LAfEPE9cq/3QMDlWHs 5QRAxjfxxVTDQSdxbJSp4YH6hNPGfhuzfmrbSpFLL9v/EwxQrd66BXhZkUrMzj8Dtd5N gy9/M99KfuwYfzQzO55Llk76qCJ8cZytuej8ltOw3YQ2qx9x9hDG4tPb+tkyJLuY0qgH v4UA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e11-20020a17090ab38b00b001cb7ed1747fsi12354520pjr.171.2022.05.23.00.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:58:03 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B31F193FB; Sun, 22 May 2022 23:57:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242184AbiEUMtS (ORCPT + 99 others); Sat, 21 May 2022 08:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234255AbiEUMtQ (ORCPT ); Sat, 21 May 2022 08:49:16 -0400 Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [IPv6:2a01:37:3000::53df:4ef0:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DC4E47396 for ; Sat, 21 May 2022 05:49:11 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 45DD1280044C9; Sat, 21 May 2022 14:49:10 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 367F82ED3A8; Sat, 21 May 2022 14:49:10 +0200 (CEST) Date: Sat, 21 May 2022 14:49:10 +0200 From: Lukas Wunner To: Sheng Bi Cc: Bjorn Helgaas , Alex Williamson , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] PCI: Fix no-op wait after secondary bus reset Message-ID: <20220521124910.GA13556@wunner.de> References: <20220516165740.6256af51.alex.williamson@redhat.com> <20220518115432.76183-1-windy.bi.enflame@gmail.com> <20220520064148.GA20418@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Sat, May 21, 2022 at 04:36:10PM +0800, Sheng Bi wrote: > If so, I also want to align the polling things mentioned in the > question from Alex, since pci_dev_wait() is also used for reset > functions other than SBR. To Bjorn, Alex, Lucas, how do you think if > we need to change the polling in pci_dev_wait() to 20ms intervals, or > keep binary exponential back-off with probable unexpected extra > timeout delay. The exponential backoff should probably be capped at some point to avoid excessive wait delays. I guess the rationale for exponential backoff is to not poll too frequently. Capping at 20 msec or 100 msec may be reasonable, i.e.: - delay *= 2; + delay = min(delay * 2, 100); Thanks, Lukas