Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp649618ybg; Mon, 1 Jun 2020 10:42:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMxjj9MaolO7dX5LaQHXCr8z11IjW/q3rxQ3+rg6AZkEBZK5e/wpJeCBhZ6frqH4Ch61kP X-Received: by 2002:a05:6402:b91:: with SMTP id cf17mr22419358edb.148.1591033370701; Mon, 01 Jun 2020 10:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591033370; cv=none; d=google.com; s=arc-20160816; b=HWHE+TcaYLb389CzC4+8ugB9mMZ+qAz/UhteSRJyGG/O3uZmwwBRp46B/DRxyuaYuv RsBP++a1Ftp9QJE8uBoXV3xN69+sXUn7bwvGjAxN1Dc8pk2fT23DrGWZPgur6oWlBaYM 4BWPM9BnO7Z450Gyi2oZi/XbsEkZc8rWbyDBfpFYgs32Ni6hHLcoMnYlVWpE46JBJkYU w8E1X7sGOMEXTvMoFu4hrjUzxa/1DQHkKdYarwxQsPyur8Ba8njR8rYyIxYhD8LumUTU 2lqm5UhrooMcy206Kn+4KBZMDZZ98mIBPK3m7YpJKC8DPweKJQOzmXPfx35S+e8rFlBi s/UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=Jxqe2v62aIvVMQm6N7Owazr3se7ApQXBnGwfCDE6IZM=; b=M8hZj1kqJ8nXOZtNe3rgr/rgCUfOis/4Ka/lSKL0sl5eaPo4LutFfv6UPzGXs9F7jj 0fD+KMtcUHlAJ5SpBPbbvvwjaUTETTmGH2FyC+R9D2voXCs4L0eCfwgrs5HenG2YIvpP k4uweNwEklN1j6H4O6OjCEJWA99K0Ugxkzx7ocj/CBudGJ14SU6ykq3QQCrKbtsZ4HmR sjvK08LccID72OTGbP0Q3w/sszss5j7Mflbc95pHleQQv0gFIcy3VZcv3dut0FF4e2A3 EqbhIkO+UZPanSqR0F6rXgwJNFFNLMJ+cgxr1xitaaH3db50fLCN2q8VSoTw+Af7ezOX us2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PBS/XvI5"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c33si53967edf.264.2020.06.01.10.41.56; Mon, 01 Jun 2020 10:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PBS/XvI5"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbgFARlH (ORCPT + 99 others); Mon, 1 Jun 2020 13:41:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:58534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbgFARlH (ORCPT ); Mon, 1 Jun 2020 13:41:07 -0400 Received: from localhost (mobile-166-175-190-200.mycingular.net [166.175.190.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 48FEF206A4; Mon, 1 Jun 2020 17:41:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591033266; bh=egFH6RgQ4a+4kLCfGrEDkjv5v4bJblqDQOjodPikqEM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=PBS/XvI5mPBJhMQPW3QR/267YghZh8VBNHFVIA3y76nvmv7wSAOnIG8ZofBmrwL3W hjX/e/kbh6hI/0SHMT/KsCJ3IYwK/78zwY6ZY8W6ZDDtNYI4kfbVVgq5NF84Mj/Dz5 u9OiYWmcq6uvLgae6Udy20G6q8HsslAkBraLQcZo= Date: Mon, 1 Jun 2020 12:41:04 -0500 From: Bjorn Helgaas To: Joerg Roedel Cc: Zhangfei Gao , Bjorn Helgaas , Arnd Bergmann , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Len Brown , jean-philippe , Greg Kroah-Hartman , Herbert Xu , kenneth-lee-2012@foxmail.com, Wangzhou , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux-foundation.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU Message-ID: <20200601174104.GA734973@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528073344.GO5221@8bytes.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, May 28, 2020 at 09:33:44AM +0200, Joerg Roedel wrote: > On Wed, May 27, 2020 at 01:18:42PM -0500, Bjorn Helgaas wrote: > > Is this slowdown significant? We already iterate over every device > > when applying PCI_FIXUP_FINAL quirks, so if we used the existing > > PCI_FIXUP_FINAL, we wouldn't be adding a new loop. We would only be > > adding two more iterations to the loop in pci_do_fixups() that tries > > to match quirks against the current device. I doubt that would be a > > measurable slowdown. > > I don't know how significant it is, but I remember people complaining > about adding new PCI quirks because it takes too long for them to run > them all. That was in the discussion about the quirk disabling ATS on > AMD Stoney systems. > > So it probably depends on how many PCI devices are in the system whether > it causes any measureable slowdown. I found this [1] from Paul Menzel, which was a slowdown caused by quirk_usb_early_handoff(). I think the real problem is individual quirks that take a long time. The PCI_FIXUP_IOMMU things we're talking about should be fast, and of course, they're only run for matching devices anyway. So I'd rather keep them as PCI_FIXUP_FINAL than add a whole new phase. Bjorn [1] https://lore.kernel.org/linux-pci/b1533fd5-1fae-7256-9597-36d3d5de9d2a@molgen.mpg.de/